// JavaScript Document for HighCharts Creation
	
	var serverUrl = 'http://haas.uwf.edu:20000/test/WebForm1.aspx?';
	var chart;
	var fail = true;
	var chartLoad = false;
	//var showLegend = false;
	//console.log("SHOWLEGEND value after var definition is: " + showLegend);
//	END GLOBAL VARIABLES

/*
	Functions:
	
	--Active Listeners
	$( "#NameOfTargetPage" ).on( "pagebeforecreate", function( event ) {});
		-This listener waits for a page to be browsed to. Once the page is browsed to, it adds in html for a footer.
		
	$(document).on('pageshow', '#NameOfTargetPage', function(){});
		-This listener waits for a page to appear on the screen. When the page appears it fills it with a graph.
		
	$( "#NameOfTargetPage" ).on( "pagebeforehide", function( event ) {});
		-This listener waits for a page to be browsed away from. When the page is being left, the graph is destroyed.
		
	--General Functions
	generateFooter('#NameOfTargetPage', '#NameOfRootPage', 'Message for the info button in the footer on the charts page');
	
	generateCharts('TargetDataUrl', 'Title Of Chart', 'Title of Y-Axis', 'Title for Tooltip', 'NameOfTargetChartContainer', 'quarterly'(if not quarterly, leave blank));
	
	removeElements('#NameOfTargetPage');
	
*/

/*$(document).on('pagebeforeshow', '#nation', function(){  
	$("#nationList").listview('refresh');
	if(nationRefresh == 0){
		
		//alert(nationRefresh);
		$.mobile.changePage("#nation", {allowSamePageTransition: true});
		nationRefresh++;
		}
});
$(document).on('pagebeforeshow', '#florida', function(){  
	$("#floridaList").listview('refresh');
	if(flRefresh == 0){
		
		//alert(nationRefresh);
		$.mobile.changePage("#florida", {allowSamePageTransition: true});
		flRefresh++;
		}
});*/

$( "#nation" ).on( "pageshow", function( event ) {
	$(window).trigger('resize');
	$("#nation").off();
});

$( "#florida" ).on( "pageshow", function( event ) {
	$(window).trigger('resize');
	$("#florida").off();
});



/////////++++++++++++++++++++/////////NATION////////++++++++++++++++++++//////////

///////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#NationEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationEmploymentCharts', '#nation', 'The graph tracks the monthly, seasonally adjusted employment figure for the US employment figure over time.');
});
$(document).on('pageshow', '#NationEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=employment', 'US Employment (SA)', 'Millions', 'US Employment', 'nationEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#nation');
});
$( "#NationEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationEmploymentCharts');
});
///////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#NationUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationUnemploymentCharts', '#nation', 'The graph tracks the percentage of the unemployed in the civilian labor force.  This graph is seasonally adjusted in order to show trends in the economy.');
});
$(document).on('pageshow', '#NationUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=unemployment_rate', 'US Unemployment Rate (SA)', '', 'US Unemployment', 'nationUnemploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#nation');
});
$( "#NationUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationUnemploymentCharts');
});
///////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#NationInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationInitialClaimsCharts', '#nation', 'The graph tracks the average weekly number of unemployment insurance claims throughout the US on a monthly basis over time. The figure is seasonally adjusted in order to show a more reliable trend.');
});
$(document).on('pageshow', '#NationInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=unemployment_insurance_initial_claims', 'US Initial Claims (SA)', 'Thousands', 'US Initial Claims (SA)', 'nationInitialClaimsCharts_container', '', '', 'US Employment and Training Administration', '', '#nation');
});
$( "#NationInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationInitialClaimsCharts');
});
///////////////////////////////////// INFLATION - CONSUMER PRICE INDEX /////////////////////////////////////////
$( "#NationInflationCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationInflationCharts', '#nation', 'The graph tracks the monthly change in the Consumer Price Index indicating trends in the rate of inflation. ');
});
$(document).on('pageshow', '#NationInflationCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=inflation_or_cpi', 'US Consumer Price Index', '', 'US Inflation', 'nationInflationCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#nation');
});
$( "#NationInflationCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationInflationCharts');
});
///////////////////////////////////// GDP UPDATED QUARTERLY /////////////////////////////////////////
$( "#NationGDPCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationGDPCharts', '#nation', 'The graph tracks the nominal value of US GDP over time.');
});
$(document).on('pageshow', '#NationGDPCharts', function(){  
	generateCharts(serverUrl + 'table=nationquarterly&column=gdp_nominal', 'US Gross Domestic Product', 'Trillions (USD)', 'GDP', 'nationGDPCharts_container', null, null, 'US Bureau of Economic Analysis (BEA)', 'quarterly', '#nation');
});
$( "#NationGDPCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationGDPCharts');
});
///////////////////////////////////// CONSUMER CONFICENCE /////////////////////////////////////////
$( "#NationConsumerConfidenceCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationConsumerConfidenceCharts', '#nation', 'The graph tracks the value of the Consumer Price Index over time.');
});
$(document).on('pageshow', '#NationConsumerConfidenceCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=consumer_confidence_index', 'US Consumer Confidence Index', '', 'Consumer Confidence', 'nationConsumerConfidenceCharts_container', '', '', 'The Conference Board', '', '#nation');
});
$( "#NationConsumerConfidenceCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationConsumerConfidenceCharts');
});
///////////////////////////////////// HOME PRICE INDEX /////////////////////////////////////////
$( "#NationCaseShillerCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationCaseShillerCharts', '#nation', 'The graph tracks the value of the Case-Shiller Home Price Index over time.');
});
$(document).on('pageshow', '#NationCaseShillerCharts', function(){   
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'US Home Price Index (SA)', '', 'US Home Price Index (SA)', 'nationCaseShillerCharts_container', '', '', 'Standard & Poors', '', '#nation');
});
$( "#NationCaseShillerCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationCaseShillerCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#NationRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationRentPriceIndexCharts', '#nation');
});
$(document).on('pageshow', '#NationRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'US Rent Price Index', 'Index', 'CS Index', 'nationRentPriceIndexCharts_container', '', '', '???');
});
$( "#NationRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationRentPriceIndexCharts');
});*/
///////////////////////////////////// MORTGAGE RATES - MORTGAGE MARKET SURVEY /////////////////////////////////////////
$( "#NationRatesCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationRatesCharts', '#nation', 'The graph tracks the value of 30-year mortgage rates over time.');
});
$(document).on('pageshow', '#NationRatesCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=mortgage_market_survey', '30-Yr Fixed Mortgage Rate', '', 'Mortgage Rate', 'nationRatesCharts_container', '', '', 'Freddie Mac', '', '#nation');
});
$( "#NationRatesCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationRatesCharts');
});
///////////////////////////////////// HOUSING PERMITS - RESIDENTIAL PERMITS /////////////////////////////////////////
$( "#NationPermitsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationPermitsCharts', '#nation', 'This graph tracks the number of housing permits issued on a monthly basis over time.');
});
$(document).on('pageshow', '#NationPermitsCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=residential_permits', 'US Housing Permits', 'Thousands', 'US Housing Permits', 'nationPermitsCharts_container', '', '', 'US Census Bureau (BOC)', '', '#nation');
});
$( "#NationPermitsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationPermitsCharts');
});
///////////////////////////////////// CRUDE OIL /////////////////////////////////////////
$( "#NationCrudeOilCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationCrudeOilCharts', '#nation', 'The graph represents the monthly average cost per barrel of crude oil over time.');
});
$(document).on('pageshow', '#NationCrudeOilCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=oil_price', 'WTI Crude Oil', 'USD (bbl)', 'WTI Crude Oil', 'nationCrudeOilCharts_container', '', '', 'US Energy Information Administration', '', '#nation');
});
$( "#NationCrudeOilCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationCrudeOilCharts');
});
///////////////////////////////////// GASOLINE /////////////////////////////////////////
$( "#NationGasCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationGasCharts', '#nation', 'This chart represents the average price of a gallon of gasoline (unleaded, medium grade, premium and diesel) over time.');
});
$(document).on('pageshow', '#NationGasCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=unleaded_gasoline_price', 'US Retail Gasoline Price', 'USD (gal)', 'US Retail Gasoline Price', 'nationGasCharts_container', '', '', 'Oil Price Information Services', '', '#nation');
});
$( "#NationGasCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationGasCharts');
});
///////////////////////////////////// GOLD /////////////////////////////////////////
$( "#NationGoldCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationGoldCharts', '#nation', 'The graph tracks the monthly average cost of gold per ounce over time.');
});
$(document).on('pageshow', '#NationGoldCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=gold_price', 'Gold', 'USD (oz)', 'Gold', 'nationGoldCharts_container', '', '', 'www.kitco.com', '', '#nation');
});
$( "#NationGoldCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationGoldCharts');
});
///////////////////////////////////// 10 YEAR TREASURY /////////////////////////////////////////
$( "#Nation10YearTreasuryCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#Nation10YearTreasuryCharts', '#nation', 'The graph tracks the average monthly yield for 10-Yr Treasury Bonds.');
});
$(document).on('pageshow', '#Nation10YearTreasuryCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=ten_year_treasury', '10-Yr Treasury Rate', '', '10 Year Treasury Rate', 'nation10YearTreasuryCharts_container', '', '', 'US Federal Reserve (FRB)', '', '#nation');
});
$( "#Nation10YearTreasuryCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#Nation10YearTreasuryCharts');
});
///////////////////////////////////// US DOLLAR INDEX - US DOLLAR EXCHANGE RATE /////////////////////////////////////////
$( "#NationUSDollarIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NationUSDollarIndexCharts', '#nation', 'The graph tracks the monthly average of the US Dollar Index over time.');
});
$(document).on('pageshow', '#NationUSDollarIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=us_dollar_exchange_rate', 'US Dollar Index', '', 'US Dollar Index', 'nationUSDollarIndexCharts_container', '', '', 'US Federal Reserve (FRB)', '', '#nation');
});
$( "#NationUSDollarIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NationUSDollarIndexCharts');
});
///////////////End of Nation///////////////

/////////++++++++++++++++++++///////// FLORIDA ////////++++++++++++++++++++//////////

/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#FloridaEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaEmploymentCharts', '#florida', 'The graph tracks the monthly, seasonally adjusted employment figure for the Florida employment figure over time.');
});
$(document).on('pageshow', '#FloridaEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=floridadata&column=employment', 'FL Employment (SA)', 'Millions', 'FL Employment', 'floridaEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#florida');
});
$( "#FloridaEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////  !!! May need to add US rate !!!
$( "#FloridaUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaUnemploymentCharts', '#florida', 'The graph tracks the percentage of the unemployed of Florida’s civilian labor force.  This graph is seasonally adjusted in order to show trends in the economy.');
});
$(document).on('pageshow', '#FloridaUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=floridadata&column=unemployment_rate', 'FL Unemployment Rate (SA)', '', 'FL', 'floridaUnemploymentCharts_container', 'florida', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#florida');  //!!! addeded true parameter for chalrt legend
});
$( "#FloridaUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////  !!! May need to add US rate !!!
$( "#FloridaInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaInitialClaimsCharts', '#florida', 'The graph tracks the total number of monthly unemployment claims throughout the state of Florida over time.');
});
$(document).on('pageshow', '#FloridaInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialClaims&column=[State]', 'FL Initial Claims', 'Thousands', 'FL Initial Claims', 'floridaInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#florida');
});
$( "#FloridaInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaInitialClaimsCharts');
});
/////////////////////////////////// FREDDIE MAC HOUSE PRICE INDEX /////////////////////////////////////////
$( "#FloridaFreddieMacHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaFreddieMacHousePriceIndexCharts', '#florida', 'The graph tracks the value of the Freddie Mac Home Price Index over time.');
});
$(document).on('pageshow', '#FloridaFreddieMacHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=floridadata&column=freddie_mac_house_price_index', 'FL Home Price Index', '', 'House Price Index', 'floridaFreddieMacHousePriceIndexCharts_container', '', '', 'Freddie Mac', '', '#florida');
});
$( "#FloridaFreddieMacHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaFreddieMacHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#FloridaRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaRentPriceIndexCharts', '#florida', 'info');
});
$(document).on('pageshow', '#FloridaRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'FL Rent Price Index', '', 'FL Rent Price Index', 'floridaRentPriceIndexCharts_container', '', '', '???');
});
$( "#FloridaRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaRentPriceIndexCharts');
});*/
/////////////////////////////////// CONSUMER CONFIDENCE INDEX /////////////////////////////////////////
$( "#FloridaConsumerConfidenceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaConsumerConfidenceIndexCharts', '#florida', 'This graph tracks the value of the Florida Consumer Sentiment Index level over time.');
});
$(document).on('pageshow', '#FloridaConsumerConfidenceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=floridadata&column=consumer_confidence_index', 'FL Consumer Sentiment Index', '', 'Consumer Confidence Index', 'floridaConsumerConfidenceIndexCharts_container', '', '', 'Bebr.ufl.edu', '', '#florida');
});
$( "#FloridaConsumerConfidenceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaConsumerConfidenceIndexCharts');
});
/////////////////////////////////// FLORIDA BED TAX /////////////////////////////////////////
$( "#FloridaBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaBedTaxCharts', '#florida', 'This graph tracks monthly aggregate bed tax collections throughout the state of Florida over time.');
});
$(document).on('pageshow', '#FloridaBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[State]', 'FL Bed Tax', 'Millions (USD)', 'Florida Bed Tax', 'floridaBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#florida');
});
$( "#FloridaBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#FloridaAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaAutomobileCharts', '#florida', 'The graph tracks the amount of auto sales occurring in the state of Florida on a monthly basis over time.');
});
$(document).on('pageshow', '#FloridaAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[state automobile]', 'FL Auto Sales', 'Billions (USD)', 'FL Auto Sales', 'floridaAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#florida');
});
$( "#FloridaAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#FloridaDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaDurableGoodsCharts', '#florida', 'The graph tracks the amount of durable goods sales occurring in the state of Florida on a monthly basis over time.');
});
$(document).on('pageshow', '#FloridaDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[state durable]', 'FL Durable Goods', 'Billions (USD)', 'FL Durable Goods', 'floridaDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#florida');
});
$( "#FloridaDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#FloridaTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaTourismCharts', '#florida', 'The graph tracks the amount of tourism sales occurring in the state of Florida on a monthly basis over time.');
});
$(document).on('pageshow', '#FloridaTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[state tourism]', 'FL Tourism', 'Billions (USD)', 'FL Tourism', 'floridaTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#florida');
});
$( "#FloridaTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#FloridaNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaNondurableGoodsCharts', '#florida', 'The graph tracks the amount of nondurable goods sales occurring in the state of Florida on a monthly basis over time.');
});
$(document).on('pageshow', '#FloridaNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[state nondurable]', 'FL Nondurable Goods', 'Billions (USD)', 'FL Nondurable Goods', 'floridaNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#florida');
});
$( "#FloridaNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#FloridaConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaConstructionCharts', '#florida', 'The graph tracks the amount of construction sales occurring in the state of Florida on a monthly basis over time.');
});
$(document).on('pageshow', '#FloridaConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[state construction]', 'FL Construction', 'Billions (USD)', 'FL Construction', 'floridaConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#florida');
});
$( "#FloridaConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#FloridaBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaBusinessCharts', '#florida', 'The graph tracks the amount of business investment occurring in the state of Florida on a monthly basis over time.');
});
$(document).on('pageshow', '#FloridaBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[state business]', 'FL Business Investment', 'Billions (USD)', 'FL Business', 'floridaBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#florida');
});
$( "#FloridaBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#FloridaRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaRetailIndexCharts', '#florida', 'The graph tracks the value of the FL Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#FloridaRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[state index]', 'FL Retail Index', '', 'FL Retail Index', 'floridaRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#florida');
});
$( "#FloridaRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaRetailIndexCharts');
});
/////////////////////////////////// UNLEADED GASOLINE PRICES /////////////////////////////////////////
$( "#FloridaUnleadedGasolinePricesCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FloridaUnleadedGasolinePricesCharts', '#florida', 'This chart represents the average price of a gallon of gasoline (unleaded, medium grade, premium and diesel) in the state of Florida over time.');
});
$(document).on('pageshow', '#FloridaUnleadedGasolinePricesCharts', function(){  
	generateCharts(serverUrl + 'table=floridadata&column=unleaded_gasoline_price', 'FL Retail Gasoline Price', 'USD (gal)', 'FL Unleaded Gasoline Price', 'floridaUnleadedGasolinePricesCharts_container', '', '', 'Oil Price Information Services', '', '#florida');
});
$( "#FloridaUnleadedGasolinePricesCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FloridaUnleadedGasolinePricesCharts');
});
/////////////End of Florida///////////////

///////++++++++++++++++++++///////// FLORIDA ////////++++++++++++++++++++//////////

////////////////CRESTVIEW//////////////////

/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#CrestviewEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewEmploymentCharts', '#crestview', 'The graph tracks the monthly, seasonally adjusted employment figure for the Crestview MSA over time.');
});
$(document).on('pageshow', '#CrestviewEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=fort_walton_beach_crestview_destin', 'Employment Crestview (SA)', 'Thousands', 'Crestview Employment','crestviewEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#crestview');
});
$( "#CrestviewEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT RATE /////////////////////////////////////////
$( "#CrestviewUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewUnemploymentCharts', '#crestview', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Crestview MSA over time.');
});
$(document).on('pageshow', '#CrestviewUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=fort_walton_beach_crestview_destin', 'Crestview Unemployment Rate (SA)', '', 'Crestview', 'crestviewUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#crestview');
});
$( "#CrestviewUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#CrestviewInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewInitialClaimsCharts', '#crestview', 'The graph tracks total monthly unemployment claims within the Crestview MSA over time.');
});
$(document).on('pageshow', '#CrestviewInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[Fort Walton Beach_Crestview_Destin]', 'Crestview Initial Claims', '', 'Crestview Initial Claims', 'crestviewInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#crestview');
});
$( "#CrestviewInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewInitialClaimsCharts');
});
///////////////////////////////////// MEDIAN HOUSE PRICE /////////////////////////////////////////
$( "#CrestviewHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewHousePriceIndexCharts', '#crestview', 'The graph tracks the Zillow© Median Home Value Index within the Crestview MSA over time.');
});
$(document).on('pageshow', '#CrestviewHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=crestview', 'Crestview Median Home Value', 'Thousands (USD)', 'Crestview Median Home Value', 'crestviewHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#crestview');
});
$( "#CrestviewHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#CrestviewRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewRentPriceIndexCharts', '#crestview');
});
$(document).on('pageshow', '#CrestviewRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Crestview Rent Price Index', 'Index', 'CS Index', 'crestviewRentPriceIndexCharts_container');
});
$( "#CrestviewRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#CrestviewBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewBedTaxCharts', '#crestview', 'The graph tracks monthly bed tax collections within the Crestview MSA over time.');
});
$(document).on('pageshow', '#CrestviewBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[fort walton beach_crestview_destin]', 'Crestview Bed Tax', 'Thousands (USD)', 'Crestview Bed Tax', 'crestviewBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#crestview');
});
$( "#CrestviewBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#CrestviewAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewAutomobileCharts', '#crestview', 'The graph tracks the volume of auto sales occurring within the Crestview MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#CrestviewAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[fort walton automobile]', 'Crestview Auto Sales', 'Millions (USD)', 'Crestview Auto Sales', 'crestviewAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#crestview');
});
$( "#CrestviewAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#CrestviewDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewDurableGoodsCharts', '#crestview', 'The graph tracks the volume of durable goods sales occurring within the Crestview MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#CrestviewDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[fort walton durable]', 'Crestview Durable Goods', 'Millions (USD)', 'Crestview Durable Goods', 'crestviewDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#crestview');
});
$( "#CrestviewDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#CrestviewTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewTourismCharts', '#crestview', 'The graph tracks the volume of tourism sales occurring within the Crestview MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#CrestviewTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[fort walton tourism]', 'Crestview Tourism', 'Millions (USD)', 'Crestview Tourism', 'crestviewTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#crestview');
});
$( "#CrestviewTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#CrestviewNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewNondurableGoodsCharts', '#crestview', 'The graph tracks the volume of nondurable goods sales occurring within the Crestview MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#CrestviewNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[fort walton nondurable]', 'Crestview Nondurable Goods', 'Millions (USD)', 'Crestview Nondurable Goods', 'crestviewNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#crestview');
});
$( "#CrestviewNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#CrestviewConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewConstructionCharts', '#crestview', 'The graph tracks the volume of construction sales occurring within the Crestview MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#CrestviewConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[fort walton construction]', 'Crestview Construction', 'Millions (USD)', 'Crestview Construction', 'crestviewConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#crestview');
});
$( "#CrestviewConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#CrestviewBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewBusinessCharts', '#crestview', 'The graph tracks the volume of business investment occurring within the Crestview MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#CrestviewBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[fort walton business]', 'Crestview Business Investment', 'Millions (USD)', 'Crestview Business Investment', 'crestviewBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#crestview');
});
$( "#CrestviewBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#CrestviewRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#CrestviewRetailIndexCharts', '#crestview', 'The graph tracks the value of the Crestview MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#CrestviewRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[fort walton index]', 'Crestview Retail Index', '', 'Crestview Retail Index', 'crestviewRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#crestview');
});
$( "#CrestviewRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#CrestviewRetailIndexCharts');
});

//////////////// PANAMA CITY //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#PanamaCityEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityEmploymentCharts', '#panamaCity', 'The graph tracks the monthly, seasonally adjusted employment figure for the Panama City MSA over time.');
});
$(document).on('pageshow', '#PanamaCityEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=panama_city_lynn_haven', 'Panama City Employment (SA)', 'Thousands', 'Panama City Employment','panamaCityEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#panamaCity');
});
$( "#PanamaCityEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#PanamaCityUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityUnemploymentCharts', '#panamaCity', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Panama City MSA over time.');
});
$(document).on('pageshow', '#PanamaCityUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=panama_city_lynn_haven', 'Panama City Unemployment Rate (SA)', '', 'Panama City', 'panamaCityUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#panamaCity');
});
$( "#PanamaCityUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#PanamaCityInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityInitialClaimsCharts', '#panamaCity', 'The graph tracks total monthly unemployment claims within the Panama City MSA over time.');
});
$(document).on('pageshow', '#PanamaCityInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[panama city_lynn haven_panama city beach]', 'Panama City Initial Claims', '', 'Panama City Initial Claims', 'panamaCityInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#panamaCity');
});
$( "#PanamaCityInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#PanamaCityHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityHousePriceIndexCharts', '#panamaCity', 'The graph tracks the Zillow© Median Home Value Index within the Panama City MSA over time.');
});
$(document).on('pageshow', '#PanamaCityHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[panama city]', 'Panama City Median Home Value', 'Thousands (USD)', 'Panama City Median Home Value', 'panamaCityHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#panamaCity');
});
$( "#PanamaCityHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#PanamaCityRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityRentPriceIndexCharts', '#panamaCity');
});
$(document).on('pageshow', '#PanamaCityRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'PanamaCity Rent Price Index', 'Index', 'CS Index', 'panamaCityRentPriceIndexCharts_container');
});
$( "#PanamaCityRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#PanamaCityBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityBedTaxCharts', '#panamaCity', 'The graph tracks monthly bed tax collections within the Panama City MSA over time.');
});
$(document).on('pageshow', '#PanamaCityBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[panama city_lynn haven_panama city beach]', 'Panama City Bed Tax', 'Thousands (USD)', 'Panama City Bed Tax', 'panamaCityBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#panamaCity');
});
$( "#PanamaCityBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#PanamaCityAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityAutomobileCharts', '#panamaCity', 'The graph tracks the volume of auto sales occurring within the Panama City MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PanamaCityAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[panama city automobile]', 'Panama City Auto Sales', 'Millions (USD)', 'Panama City Auto Sales', 'panamaCityAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#panamaCity');
});
$( "#PanamaCityAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#PanamaCityDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityDurableGoodsCharts', '#panamaCity', 'The graph tracks the volume of durable goods sales occurring within the Panama City MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PanamaCityDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[panama city durable]', 'Panama City Durable Goods', 'Millions (USD)', 'Panama City Durable Goods', 'panamaCityDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#panamaCity');
});
$( "#PanamaCityDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#PanamaCityTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityTourismCharts', '#panamaCity', 'The graph tracks the volume of tourism sales occurring within the Panama City MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PanamaCityTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[panama city tourism]', 'Panama City Tourism', 'Millions (USD)', 'Panama City Tourism', 'panamaCityTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#panamaCity');
});
$( "#PanamaCityTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#PanamaCityNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityNondurableGoodsCharts', '#panamaCity', 'The graph tracks the volume of nondurable goods sales occurring within the Panama City MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PanamaCityNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[panama city nondurable]', 'Panama City Nondurable Goods', 'Millions (USD)', 'Panama City Nondurable Goods', 'panamaCityNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#panamaCity');
});
$( "#PanamaCityNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#PanamaCityConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityConstructionCharts', '#panamaCity', 'The graph tracks the volume of construction sales occurring within the Panama City MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PanamaCityConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[panama city construction]', 'Panama City Construction', 'Millions (USD)', 'Panama City Construction', 'panamaCityConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#panamaCity');
});
$( "#PanamaCityConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#PanamaCityBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityBusinessCharts', '#panamaCity', 'The graph tracks the volume of business investment occurring within the Panama City MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PanamaCityBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[panama city business]', 'Panama City Business Investment', 'Millions (USD)', 'Panama City Business Investment', 'panamaCityBusinessCharts_container', '' ,'' ,'Florida Department of Revenue', '', '#panamaCity');
});
$( "#PanamaCityBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#PanamaCityRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PanamaCityRetailIndexCharts', '#panamaCity', 'The graph tracks the value of the Panama City MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#PanamaCityRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[panama city index]', 'Panama City Retail Index', '', 'Panama City Retail Index', 'panamaCityRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#panamaCity');
});
$( "#PanamaCityRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PanamaCityRetailIndexCharts');
});

//////////////// PENSACOLA //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#PensacolaEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaEmploymentCharts', '#pensacola', 'The graph tracks the monthly, seasonally adjusted employment figure for the Pensacola MSA over time.');
});
$(document).on('pageshow', '#PensacolaEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=pensacola_ferry_pass_brent', 'Pensacola Employment (SA)', 'Thousands', 'Pensacola Employment', 'pensacolaEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#pensacola');
});
$( "#PensacolaEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#PensacolaUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaUnemploymentCharts', '#pensacola', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Pensacola MSA over time.');
});
$(document).on('pageshow', '#PensacolaUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=pensacola_ferry_pass_brent', 'Pensacola Unemployment Rate (SA)', '', 'Pensacola', 'pensacolaUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#pensacola');
});
$( "#PensacolaUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#PensacolaInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaInitialClaimsCharts', '#pensacola', 'The graph tracks total monthly unemployment claims within the Pensacola MSA over time.');
});
$(document).on('pageshow', '#PensacolaInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[pensacola_ferry pass_brent]', 'Pensacola Initial Claims', '', 'Pensacola Initial Claims', 'pensacolaInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#pensacola');
});
$( "#PensacolaInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#PensacolaHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaHousePriceIndexCharts', '#pensacola', 'The graph tracks the Zillow© Median Home Value Index within the Pensacola MSA over time.');
});
$(document).on('pageshow', '#PensacolaHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[pensacola]', 'Pensacola Median Home Value', 'Thousands (USD)', 'Pensacola Median Home Value', 'pensacolaHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#pensacola');
});
$( "#PensacolaHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#PensacolaRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaRentPriceIndexCharts', '#pensacola');
});
$(document).on('pageshow', '#PensacolaRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Pensacola Rent Price Index', 'Index', 'CS Index', 'pensacolaRentPriceIndexCharts_container');
});
$( "#PensacolaRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#PensacolaBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaBedTaxCharts', '#pensacola', 'The graph tracks monthly bed tax collections within the Pensacola MSA over time.');
});
$(document).on('pageshow', '#PensacolaBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[pensacola_ferry pass_brent]', 'Pensacola Bed Tax', 'Thousands (USD)', 'Pensacola Bed Tax', 'pensacolaBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#pensacola');
});
$( "#PensacolaBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#PensacolaAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaAutomobileCharts', '#pensacola', 'The graph tracks the volume of auto sales occurring within the Pensacola MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PensacolaAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[pensacola automobile]', 'Pensacola Auto Sales', 'Millions (USD)', 'Pensacola Auto Sales', 'pensacolaAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#pensacola');
});
$( "#PensacolaAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#PensacolaDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaDurableGoodsCharts', '#pensacola', 'The graph tracks the volume of durable goods sales occurring within the Pensacola MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PensacolaDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[pensacola durable]', 'Pensacola Durable Goods', 'Millions (USD)', 'Pensacola Durable Goods', 'pensacolaDurableGoodsCharts_container', '','', 'Florida Department of Revenue', '', '#pensacola');
});
$( "#PensacolaDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#PensacolaTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaTourismCharts', '#pensacola', 'The graph tracks the volume of tourism sales occurring within the Pensacola MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PensacolaTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[pensacola tourism]', 'Pensacola Tourism', 'Millions (USD)', 'Pensacola Tourism', 'pensacolaTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#pensacola');
});
$( "#PensacolaTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#PensacolaNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaNondurableGoodsCharts', '#pensacola', 'The graph tracks the volume of nondurable goods sales occurring within the Pensacola MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PensacolaNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[pensacola nondurable]', 'Pensacola Nondurable Goods', 'Millions (USD)', 'Pensacola Nondurable Goods', 'pensacolaNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#pensacola');
});
$( "#PensacolaNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#PensacolaConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaConstructionCharts', '#pensacola', 'The graph tracks the volume of construction sales occurring within the Pensacola MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PensacolaConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[pensacola construction]', 'Pensacola Construction', 'Millions (USD)', 'Pensacola Construction', 'pensacolaConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#pensacola');
});
$( "#PensacolaConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#PensacolaBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaBusinessCharts', '#pensacola', 'The graph tracks the volume of business investment occurring within the Pensacola MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PensacolaBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[pensacola business]', 'Pensacola Business Investment', 'Millions (USD)', 'Pensacola Business Investment', 'pensacolaBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#pensacola');
});
$( "#PensacolaBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#PensacolaRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PensacolaRetailIndexCharts', '#pensacola', 'The graph tracks the value of the Pensacola MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#PensacolaRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[pensacola index]', 'Pensacola Retail Index', '', 'Pensacola Retail Index', 'pensacolaRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#pensacola');
});
$( "#PensacolaRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PensacolaRetailIndexCharts');
});

//////////////// TALLAHASSEE //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#TallahasseeEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeEmploymentCharts', '#tallahassee', 'The graph tracks the monthly, seasonally adjusted employment figure for the Tallahassee MSA over time.');
});
$(document).on('pageshow', '#TallahasseeEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=tallahassee', 'Tallahassee Employment (SA)', 'Thousands', 'Tallahassee Employment', 'tallahasseeEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#tallahassee');
});
$( "#TallahasseeEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#TallahasseeUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeUnemploymentCharts', '#tallahassee', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Tallahassee MSA over time.');
});
$(document).on('pageshow', '#TallahasseeUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=tallahassee', 'Tallahassee Unemployment Rate (SA)', '', 'Tallahassee', 'tallahasseeUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#tallahassee');
});
$( "#TallahasseeUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#TallahasseeInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeInitialClaimsCharts', '#tallahassee', 'The graph tracks total monthly unemployment claims within the Tallahassee MSA over time.');
});
$(document).on('pageshow', '#TallahasseeInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[tallahassee]', 'Tallahassee Initial Claims', '', 'Tallahassee Initial Claims', 'tallahasseeInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#tallahassee');
});
$( "#TallahasseeInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#TallahasseeHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeHousePriceIndexCharts', '#tallahassee', 'The graph tracks the Zillow© Median Home Value Index within the Tallahassee MSA over time.');
});
$(document).on('pageshow', '#TallahasseeHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[tallahassee]', 'Tallahassee Median Home Value', 'Thousands (USD)', 'Tallahassee Median Home Value', 'tallahasseeHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#tallahassee');
});
$( "#TallahasseeHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#TallahasseeRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeRentPriceIndexCharts', '#tallahassee');
});
$(document).on('pageshow', '#TallahasseeRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Tallahassee Rent Price Index', 'Index', 'CS Index', 'tallahasseeRentPriceIndexCharts_container');
});
$( "#TallahasseeRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#TallahasseeBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeBedTaxCharts', '#tallahassee', 'The graph tracks monthly bed tax collections within the Tallahassee MSA over time.');
});
$(document).on('pageshow', '#TallahasseeBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[tallahassee]', 'Tallahassee Bed Tax', 'Thousands (USD)', 'Tallahassee Bed Tax', 'tallahasseeBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#tallahassee');
});
$( "#TallahasseeBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#TallahasseeAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeAutomobileCharts', '#tallahassee', 'The graph tracks the volume of auto sales occurring within the Tallahassee MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TallahasseeAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tallahassee automobile]', 'Tallahassee Auto Sales', 'Millions (USD)', 'Tallahassee Auto Sales', 'tallahasseeAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#tallahassee');
});
$( "#TallahasseeAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#TallahasseeDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeDurableGoodsCharts', '#tallahassee', 'The graph tracks the volume of durable goods sales occurring within the Tallahassee MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TallahasseeDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tallahassee durable]', 'Tallahassee Durable Goods', 'Millions (USD)', 'Tallahassee Durable Goods', 'tallahasseeDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#tallahassee');
});
$( "#TallahasseeDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#TallahasseeTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeTourismCharts', '#tallahassee', 'The graph tracks the volume of tourism sales occurring within the Tallahassee MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TallahasseeTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tallahassee tourism]', 'Tallahassee Tourism', 'Millions (USD)', 'Tallahassee Tourism', 'tallahasseeTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#tallahassee');
});
$( "#TallahasseeTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#TallahasseeNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeNondurableGoodsCharts', '#tallahassee', 'The graph tracks the volume of nondurable goods sales occurring within the Tallahassee MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TallahasseeNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tallahassee nondurable]', 'Tallahassee Nondurable Goods', 'Millions (USD)', 'Tallahassee Nondurable Goods', 'tallahasseeNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#tallahassee');
});
$( "#TallahasseeNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#TallahasseeConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeConstructionCharts', '#tallahassee', 'The graph tracks the volume of construction sales occurring within the Tallahassee MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TallahasseeConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tallahassee construction]', 'Tallahassee Construction', 'Millions (USD)', 'Tallahassee Construction', 'tallahasseeConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#tallahassee');
});
$( "#TallahasseeConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#TallahasseeBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeBusinessCharts', '#tallahassee', 'The graph tracks the volume of business investment occurring within the Tallahassee MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TallahasseeBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tallahassee business]', 'Tallahassee Business Investment', 'Millions (USD)', 'Tallahassee Business Investment', 'tallahasseeBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#tallahassee');
});
$( "#TallahasseeBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#TallahasseeRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TallahasseeRetailIndexCharts', '#tallahassee', 'The graph tracks the value of the Tallahassee MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#TallahasseeRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tallahassee index]', 'Tallahassee Retail Index', '', 'Tallahassee Retail Index', 'tallahasseeRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#tallahassee');
});
$( "#TallahasseeRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TallahasseeRetailIndexCharts');
});

//////////////// DELTONA - (DAYTONA BEACH) //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#DaytonaBeachEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachEmploymentCharts', '#daytonaBeach', 'The graph tracks the monthly, seasonally adjusted employment figure for the Deltona MSA over time.');
});
$(document).on('pageshow', '#DaytonaBeachEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=deltona_daytona_beach_ormond_beach', 'Deltona Employment (SA)', 'Thousands', 'Deltona Employment', 'daytonaBeachEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#daytonaBeach');
});
$( "#DaytonaBeachEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#DaytonaBeachUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachUnemploymentCharts', '#daytonaBeach', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Deltona MSA over time.');
});
$(document).on('pageshow', '#DaytonaBeachUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=deltona_daytona_beach_ormond_beach', 'Deltona Unemployment Rate (SA)', '', 'Deltona', 'daytonaBeachUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#daytonaBeach');
});
$( "#DaytonaBeachUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#DaytonaBeachInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachInitialClaimsCharts', '#daytonaBeach', 'The graph tracks total monthly unemployment claims within the Deltona MSA over time.');
});
$(document).on('pageshow', '#DaytonaBeachInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[deltona_daytona beach_ormond beach]', 'Deltona Initial Claims', '', 'Deltona Initial Claims', 'daytonaBeachInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#daytonaBeach');
});
$( "#DaytonaBeachInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#DaytonaBeachHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachHousePriceIndexCharts', '#daytonaBeach', 'The graph tracks the Zillow© Median Home Value Index within the Deltona MSA over time.');
});
$(document).on('pageshow', '#DaytonaBeachHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[daytona beach]', 'Deltona Median Home Value', 'Thousands (USD)', 'Deltona Median Home Value', 'daytonaBeachHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#daytonaBeach');
});
$( "#DaytonaBeachHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#DaytonaBeachRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachRentPriceIndexCharts', '#daytonaBeach');
});
$(document).on('pageshow', '#DaytonaBeachRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'DaytonaBeach Rent Price Index', 'Index', 'CS Index', 'daytonaBeachRentPriceIndexCharts_container');
});
$( "#DaytonaBeachRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#DaytonaBeachBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachBedTaxCharts', '#daytonaBeach', 'The graph tracks monthly bed tax collections within the Deltona MSA over time.');
});
$(document).on('pageshow', '#DaytonaBeachBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[deltona_daytona beach_ormond beach]', 'Deltona Bed Tax', 'Thousands (USD)', 'Deltona Bed Tax', 'daytonaBeachBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#daytonaBeach');
});
$( "#DaytonaBeachBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#DaytonaBeachAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachAutomobileCharts', '#daytonaBeach', 'The graph tracks the volume of auto sales occurring within the Deltona MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#DaytonaBeachAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[daytona beach automobile]', 'Deltona Auto Sales', 'Millions (USD)', 'Deltona Auto Sales', 'daytonaBeachAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#daytonaBeach');
});
$( "#DaytonaBeachAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#DaytonaBeachDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachDurableGoodsCharts', '#daytonaBeach', 'The graph tracks the volume of durable goods sales occurring within the Deltona MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#DaytonaBeachDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[daytona beach durable]', 'Deltona Durable Goods', 'Millions (USD)', 'Deltona Durable Goods', 'daytonaBeachDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#daytonaBeach');
});
$( "#DaytonaBeachDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#DaytonaBeachTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachTourismCharts', '#daytonaBeach', 'The graph tracks the volume of tourism sales occurring within the Deltona MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#DaytonaBeachTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[daytona beach tourism]', 'Deltona Tourism', 'Millions (USD)', 'Deltona Beach Tourism', 'daytonaBeachTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#daytonaBeach');
});
$( "#DaytonaBeachTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#DaytonaBeachNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachNondurableGoodsCharts', '#daytonaBeach', 'The graph tracks the volume of nondurable goods sales occurring within the Deltona MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#DaytonaBeachNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[daytona beach nondurable]', 'Deltona Nondurable Goods', 'Millions (USD)', 'Deltona Nondurable Goods', 'daytonaBeachNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#daytonaBeach');
});
$( "#DaytonaBeachNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#DaytonaBeachConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachConstructionCharts', '#daytonaBeach', 'The graph tracks the volume of construction sales occurring within the Deltona MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#DaytonaBeachConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[daytona beach construction]', 'Deltona Construction', 'Millions (USD)', 'Deltona Construction', 'daytonaBeachConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#daytonaBeach');
});
$( "#DaytonaBeachConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#DaytonaBeachBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachBusinessCharts', '#daytonaBeach', 'The graph tracks the volume of business investment occurring within the Deltona MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#DaytonaBeachBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[daytona beach business]', 'Deltona Business Investment', 'Millions (USD)', 'Deltona Business Investment', 'daytonaBeachBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#daytonaBeach');
});
$( "#DaytonaBeachBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#DaytonaBeachRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#DaytonaBeachRetailIndexCharts', '#daytonaBeach', 'The graph tracks the value of the Deltona MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#DaytonaBeachRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[daytona beach index]', 'Deltona Retail Index', '', 'Deltona Retail Index', 'daytonaBeachRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#daytonaBeach');
});
$( "#DaytonaBeachRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#DaytonaBeachRetailIndexCharts');
});

//////////////// GAINESVILLE //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#GainesvilleEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleEmploymentCharts', '#gainesville', 'The graph tracks the monthly, seasonally adjusted employment figure for the Gainesville MSA over time.');
});
$(document).on('pageshow', '#GainesvilleEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=gainesville', 'Gainesville Employment (SA)', 'Thousands', 'Gainesville Employment', 'gainesvilleEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#gainesville');
});
$( "#GainesvilleEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#GainesvilleUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleUnemploymentCharts', '#gainesville', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Gainesville MSA over time.');
});
$(document).on('pageshow', '#GainesvilleUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=gainesville', 'Gainesville Unemployment Rate (SA)', '', 'Gainesville', 'gainesvilleUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#gainesville');
});
$( "#GainesvilleUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#GainesvilleInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleInitialClaimsCharts', '#gainesville', 'The graph tracks total monthly unemployment claims within the Gainesville MSA over time.');
});
$(document).on('pageshow', '#GainesvilleInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[gainesville]', 'Gainesville Initial Claims', '', 'Gainesville Initial Claims', 'gainesvilleInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#gainesville');
});
$( "#GainesvilleInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#GainesvilleHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleHousePriceIndexCharts', '#gainesville', 'The graph tracks the Zillow© Median Home Value Index within the Gainesville MSA over time.');
});
$(document).on('pageshow', '#GainesvilleHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[gainesville]', 'Gainesville Median Home Value', 'Thousands (USD)', 'Gainesville Median Home Value', 'gainesvilleHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#gainesville');
});
$( "#GainesvilleHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#GainesvilleRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleRentPriceIndexCharts', '#gainesville');
});
$(document).on('pageshow', '#GainesvilleRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Gainesville Rent Price Index', 'Index', 'CS Index', 'gainesvilleRentPriceIndexCharts_container');
});
$( "#GainesvilleRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#GainesvilleBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleBedTaxCharts', '#gainesville', 'The graph tracks monthly bed tax collections within the Gainesville MSA over time.');
});
$(document).on('pageshow', '#GainesvilleBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[gainesville]', 'Gainesville Bed Tax', 'Thousands (USD)', 'Gainesville Bed Tax', 'gainesvilleBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#gainesville');
});
$( "#GainesvilleBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#GainesvilleAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleAutomobileCharts', '#gainesville', 'The graph tracks the volume of auto sales occurring within the Gainesville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#GainesvilleAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[gainesville automobile]', 'Gainesville Auto Sales', 'Millions (USD)', 'Gainesville Auto Sales', 'gainesvilleAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#gainesville');
});
$( "#GainesvilleAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleAutomobileCharts', '', '', 'Florida Department of Revenue');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#GainesvilleDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleDurableGoodsCharts', '#gainesville', 'The graph tracks the volume of durable goods sales occurring within the Gainesville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#GainesvilleDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[gainesville durable]', 'Gainesville Durable Goods', 'Millions (USD)', 'Gainesville Durable Goods', 'gainesvilleDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#gainesville');
});
$( "#GainesvilleDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#GainesvilleTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleTourismCharts', '#gainesville', 'The graph tracks the volume of tourism sales occurring within the Gainesville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#GainesvilleTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[gainesville tourism]', 'Gainesville Tourism', 'Millions (USD)', 'Gainesville Tourism', 'gainesvilleTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#gainesville');
});
$( "#GainesvilleTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#GainesvilleNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleNondurableGoodsCharts', '#gainesville', 'The graph tracks the volume of nondurable goods sales occurring within the Gainesville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#GainesvilleNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[gainesville nondurable]', 'Gainesville Nondurable Goods', 'Millions (USD)', 'Gainesville Nondurable Goods', 'gainesvilleNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#gainesville');
});
$( "#GainesvilleNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#GainesvilleConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleConstructionCharts', '#gainesville', 'The graph tracks the volume of construction sales occurring within the Gainesville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#GainesvilleConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[gainesville construction]', 'Gainesville Construction', 'Millions (USD)', 'Gainesville Construction', 'gainesvilleConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#gainesville');
});
$( "#GainesvilleConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#GainesvilleBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleBusinessCharts', '#gainesville', 'The graph tracks the volume of business investment occurring within the Gainesville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#GainesvilleBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[gainesville business]', 'Gainesville Business Investment', 'Millions (USD)', 'Gainesville Business Investment', 'gainesvilleBusinessCharts_container', '', '' ,'Florida Department of Revenue', '', '#gainesville');
});
$( "#GainesvilleBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#GainesvilleRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#GainesvilleRetailIndexCharts', '#gainesville', 'The graph tracks the value of the Gainesville MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#GainesvilleRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[gainesville index]', 'Gainesville Retail Index', '', 'Gainesville Retail Index', 'gainesvilleRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#gainesville');
});
$( "#GainesvilleRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#GainesvilleRetailIndexCharts');
});

//////////////// JACKSONVILLE //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#JacksonvilleEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleEmploymentCharts', '#jacksonville', 'The graph tracks the monthly, seasonally adjusted employment figure for the Jacksonville MSA over time.');
});
$(document).on('pageshow', '#JacksonvilleEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=jacksonville', 'Jacksonville Employment (SA)', 'Thousands', 'Jacksonville Employment', 'jacksonvilleEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#jacksonville');
});
$( "#JacksonvilleEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#JacksonvilleUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleUnemploymentCharts', '#jacksonville', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Jacksonville MSA over time.');
});
$(document).on('pageshow', '#JacksonvilleUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=jacksonville', 'Jacksonville Unemployment Rate (SA)', '', 'Jacksonville', 'jacksonvilleUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#jacksonville');
});
$( "#JacksonvilleUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#JacksonvilleInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleInitialClaimsCharts', '#jacksonville', 'The graph tracks total monthly unemployment claims within the Jacksonville MSA over time.');
});
$(document).on('pageshow', '#JacksonvilleInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[jacksonville]', 'Jacksonville Initial Claims', '', 'Jacksonville Initial Claims', 'jacksonvilleInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#jacksonville');
});
$( "#JacksonvilleInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleInitialClaimsCharts');
});
///////////////////////////////////// Median Home Value /////////////////////////////////////////
$( "#JacksonvilleHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleHousePriceIndexCharts', '#jacksonville', 'The graph tracks the Zillow© Median Home Value Index within the Jacksonville MSA over time.');
});
$(document).on('pageshow', '#JacksonvilleHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[jacksonville]', 'Jacksonville Median Home Value', 'Thousands (USD)', 'Jacksonville Median Home Price', 'jacksonvilleHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#jacksonville');
});
$( "#JacksonvilleHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#JacksonvilleRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleRentPriceIndexCharts', '#jacksonville');
});
$(document).on('pageshow', '#JacksonvilleRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Jacksonville Rent Price Index', 'Index', 'CS Index', 'jacksonvilleRentPriceIndexCharts_container');
});
$( "#JacksonvilleRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#JacksonvilleBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleBedTaxCharts', '#jacksonville', 'The graph tracks monthly bed tax collections within the Jacksonville MSA over time.');
});
$(document).on('pageshow', '#JacksonvilleBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[jacksonville]', 'Jacksonville Bed Tax', 'Thousands (USD)', 'Jacksonville Bed Tax', 'jacksonvilleBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#jacksonville');
});
$( "#JacksonvilleBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#JacksonvilleAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleAutomobileCharts', '#jacksonville', 'The graph tracks the volume of auto sales occurring within the Jacksonville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#JacksonvilleAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[jacksonville automobile]', 'Jacksonville Auto Sales', 'Millions (USD)', 'Jacksonville Auto Sales', 'jacksonvilleAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#jacksonville');
});
$( "#JacksonvilleAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#JacksonvilleDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleDurableGoodsCharts', '#jacksonville', 'The graph tracks the volume of durable goods sales occurring within the Jacksonville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#JacksonvilleDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[jacksonville durable]', 'Jacksonville Durable Goods', 'Millions (USD)', 'Jacksonville Durable Goods', 'jacksonvilleDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#jacksonville');
});
$( "#JacksonvilleDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#JacksonvilleTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleTourismCharts', '#jacksonville', 'The graph tracks the volume of tourism sales occurring within the Jacksonville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#JacksonvilleTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[jacksonville tourism]', 'Jacksonville Tourism', 'Millions (USD)', 'Jacksonville Tourism', 'jacksonvilleTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#jacksonville');
});
$( "#JacksonvilleTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#JacksonvilleNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleNondurableGoodsCharts', '#jacksonville', 'The graph tracks the volume of nondurable goods sales occurring within the Jacksonville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#JacksonvilleNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[jacksonville nondurable]', 'Jacksonville Nondurable Goods', 'Millions (USD)', 'Jacksonville Nondurable Goods', 'jacksonvilleNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#jacksonville');
});
$( "#JacksonvilleNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#JacksonvilleConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleConstructionCharts', '#jacksonville', 'The graph tracks the volume of construction sales occurring within the Jacksonville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#JacksonvilleConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[jacksonville construction]', 'Jacksonville Construction', 'Millions (USD)', 'Jacksonville Construction', 'jacksonvilleConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#jacksonville');
});
$( "#JacksonvilleConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#JacksonvilleBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleBusinessCharts', '#jacksonville', 'The graph tracks the volume of business investment occurring within the Jacksonville MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#JacksonvilleBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[jacksonville business]', 'Jacksonville Business Investment', 'Millions (USD)', 'Jacksonville Business Investment', 'jacksonvilleBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#jacksonville');
});
$( "#JacksonvilleBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#JacksonvilleRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#JacksonvilleRetailIndexCharts', '#jacksonville', 'The graph tracks the value of the Jacksonville MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#JacksonvilleRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[jacksonville index]', 'Jacksonville Retail Index', '', 'Jacksonville Retail Index', 'jacksonvilleRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#jacksonville');
});
$( "#JacksonvilleRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#JacksonvilleRetailIndexCharts');
});

//////////////// OCALA //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#OcalaEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaEmploymentCharts', '#ocala', 'The graph tracks the monthly, seasonally adjusted employment figure for the Ocala MSA over time.');
});
$(document).on('pageshow', '#OcalaEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=ocala', 'Ocala Employment (SA)', 'Thousands', 'Ocala Employment', 'ocalaEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#ocala');
});
$( "#OcalaEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#OcalaUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaUnemploymentCharts', '#ocala', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Ocala MSA over time.');
});
$(document).on('pageshow', '#OcalaUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=ocala', 'Ocala Unemployment Rate (SA)', '', 'Ocala', 'ocalaUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#ocala');
});
$( "#OcalaUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#OcalaInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaInitialClaimsCharts', '#ocala', 'The graph tracks total monthly unemployment claims within the Ocala MSA over time.');
});
$(document).on('pageshow', '#OcalaInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[ocala]', 'Ocala Initial Claims', '', 'Ocala Initial Claims', 'ocalaInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#ocala');
});
$( "#OcalaInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#OcalaHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaHousePriceIndexCharts', '#ocala', 'The graph tracks the Zillow© Median Home Value Index within the Ocala MSA over time.');
});
$(document).on('pageshow', '#OcalaHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[ocala]', 'Ocala Median Home Value', 'Thousands (USD)', 'Ocala Median Home Value', 'ocalaHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#ocala');
});
$( "#OcalaHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#OcalaRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaRentPriceIndexCharts', '#ocala');
});
$(document).on('pageshow', '#OcalaRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Ocala Rent Price Index', 'Index', 'CS Index', 'ocalaRentPriceIndexCharts_container');
});
$( "#OcalaRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#OcalaBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaBedTaxCharts', '#ocala', 'The graph tracks monthly bed tax collections within the Ocala MSA over time.');
});
$(document).on('pageshow', '#OcalaBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[ocala]', 'Ocala Bed Tax', 'Thousands (USD)', 'Ocala Bed Tax', 'ocalaBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#ocala');
});
$( "#OcalaBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#OcalaAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaAutomobileCharts', '#ocala', 'The graph tracks the volume of auto sales occurring within the Ocala MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OcalaAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[ocala automobile]', 'Ocala Auto Sales', 'Millions (USD)', 'Ocala Auto Sales', 'ocalaAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#ocala');
});
$( "#OcalaAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#OcalaDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaDurableGoodsCharts', '#ocala', 'The graph tracks the volume of durable goods sales occurring within the Ocala MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OcalaDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[ocala durable]', 'Ocala Durable Goods', 'Millions (USD)', 'Ocala Durable Goods', 'ocalaDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#ocala');
});
$( "#OcalaDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#OcalaTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaTourismCharts', '#ocala', 'The graph tracks the volume of tourism sales occurring within the Ocala MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OcalaTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[ocala tourism]', 'Ocala Tourism', 'Millions (USD)', 'Ocala Tourism', 'ocalaTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#ocala');
});
$( "#OcalaTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#OcalaNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaNondurableGoodsCharts', '#ocala', 'The graph tracks the volume of nondurable goods sales occurring within the Ocala MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OcalaNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[ocala nondurable]', 'Ocala Nondurable Goods', 'Millions (USD)', 'Ocala Nondurable Goods', 'ocalaNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#ocala');
});
$( "#OcalaNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#OcalaConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaConstructionCharts', '#ocala', 'The graph tracks the volume of construction sales occurring within the Ocala MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OcalaConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[ocala construction]', 'Ocala Construction', 'Millions (USD)', 'Ocala Construction', 'ocalaConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#ocala');
});
$( "#OcalaConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#OcalaBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaBusinessCharts', '#ocala', 'The graph tracks the volume of business investment occurring within the Ocala MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OcalaBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[ocala business]', 'Ocala Business Investment', 'Millions (USD)', 'Ocala Business Investment', 'ocalaBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#ocala');
});
$( "#OcalaBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#OcalaRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OcalaRetailIndexCharts', '#ocala', 'The graph tracks the value of the Ocala MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#OcalaRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[ocala index]', 'Ocala Retail Index', '', 'Ocala Retail Index', 'ocalaRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#ocala');
});
$( "#OcalaRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OcalaRetailIndexCharts');
});

//////////////// PALM COAST //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#PalmCoastEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastEmploymentCharts', '#palmCoast', 'The graph tracks the monthly, seasonally adjusted employment figure for the Palm Coast MSA over time.');
});
$(document).on('pageshow', '#PalmCoastEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=palm_coast', 'Palm Coast Employment (SA)', 'Thousands', 'Palm Coast Employment', 'palmCoastEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#palmCoast');
});
$( "#PalmCoastEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#PalmCoastUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastUnemploymentCharts', '#palmCoast', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Palm Coast MSA over time.');
});
$(document).on('pageshow', '#PalmCoastUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=palm_coast', 'Palm Coast Unemployment Rate (SA)', '', 'Palm Coast', 'palmCoastUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#palmCoast');
});
$( "#PalmCoastUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#PalmCoastInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastInitialClaimsCharts', '#palmCoast', 'The graph tracks total monthly unemployment claims within the Palm Coast MSA over time.');
});
$(document).on('pageshow', '#PalmCoastInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[palm coast]', 'Palm Coast Initial Claims', '', 'Palm Coast Initial Claims', 'palmCoastInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#palmCoast');
});
$( "#PalmCoastInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#PalmCoastHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastHousePriceIndexCharts', '#palmCoast', 'The graph tracks the Zillow© Median Home Value Index within the Palm Coast MSA over time.');
});
$(document).on('pageshow', '#PalmCoastHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[palm coast]', 'Palm Coast Median Home Value', 'Thousands (USD)', 'Palm Coast Median Home Value', 'palmCoastHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#palmCoast');
});
$( "#PalmCoastHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#PalmCoastRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastRentPriceIndexCharts', '#palmCoast');
});
$(document).on('pageshow', '#PalmCoastRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'PalmCoast Rent Price Index', 'Index', 'CS Index', 'palmCoastRentPriceIndexCharts_container');
});
$( "#PalmCoastRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#PalmCoastBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastBedTaxCharts', '#palmCoast', 'The graph tracks monthly bed tax collections within the Palm Coast MSA over time.');
});
$(document).on('pageshow', '#PalmCoastBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[palm coast]', 'Palm Coast Bed Tax', 'Thousands (USD)', 'Palm Coast Bed Tax', 'palmCoastBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#palmCoast');
});
$( "#PalmCoastBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#PalmCoastAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastAutomobileCharts', '#palmCoast', 'The graph tracks the volume of auto sales occurring within the Palm Coast MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmCoastAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm coast automobile]', 'Palm Coast Auto Sales', 'Millions (USD)', 'Palm Coast Auto Sales', 'palmCoastAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#palmCoast');
});
$( "#PalmCoastAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#PalmCoastDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastDurableGoodsCharts', '#palmCoast', 'The graph tracks the volume of durable goods sales occurring within the Palm Coast MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmCoastDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm coast durable]', 'Palm Coast Durable Goods', 'Millions (USD)', 'Palm Coast Durable Goods', 'palmCoastDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#palmCoast');
});
$( "#PalmCoastDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#PalmCoastTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastTourismCharts', '#palmCoast', 'The graph tracks the volume of tourism sales occurring within the Palm Coast MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmCoastTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm coast tourism]', 'Palm Coast Tourism', 'Millions (USD)', 'Palm Coast Tourism', 'palmCoastTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#palmCoast');
});
$( "#PalmCoastTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#PalmCoastNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastNondurableGoodsCharts', '#palmCoast', 'The graph tracks the volume of nondurable goods sales occurring within the Palm Coast MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmCoastNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm coast nondurable]', 'Palm Coast Nondurable Goods', 'Millions (USD)', 'Palm Coast Nondurable Goods', 'palmCoastNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#palmCoast');
});
$( "#PalmCoastNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#PalmCoastConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastConstructionCharts', '#palmCoast', 'The graph tracks the volume of construction sales occurring within the Palm Coast MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmCoastConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm coast construction]', 'Palm Coast Construction', 'Millions (USD)', 'Palm Coast Construction', 'palmCoastConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#palmCoast');
});
$( "#PalmCoastConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#PalmCoastBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastBusinessCharts', '#palmCoast', 'The graph tracks the volume of business investment occurring within the Palm Coast MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmCoastBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm coast business]', 'Palm Coast Business Investment', 'Millions (USD)', 'Palm Coast Business Investment', 'palmCoastBusinessCharts_container', '' ,'' ,'Florida Department of Revenue', '', '#palmCoast');
});
$( "#PalmCoastBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#PalmCoastRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmCoastRetailIndexCharts', '#palmCoast', 'The graph tracks the value of the Palm Coast MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmCoastRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm coast index]', 'Palm Coast Retail Index', '', 'Palm Coast Retail Index', 'palmCoastRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#palmCoast');
});
$( "#PalmCoastRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmCoastRetailIndexCharts');
});

//////////////// ORLANDO //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#OrlandoEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoEmploymentCharts', '#orlando', 'The graph tracks the monthly, seasonally adjusted employment figure for the Orlando MSA over time.');
});
$(document).on('pageshow', '#OrlandoEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=orlando_kissimmee', 'Orlando Employment (SA)', 'Thousands', 'Orlando Employment', 'orlandoEmploymentCharts_container', '', '', 'US Bureau of Labor Statistics (BLS)', '', '#orlando');
});
$( "#OrlandoEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#OrlandoUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoUnemploymentCharts', '#orlando', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Orlando MSA over time.');
});
$(document).on('pageshow', '#OrlandoUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=orlando_kissimmee', 'Orlando Unemployment Rate (SA)', '', 'Orlando', 'orlandoUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#orlando');
});
$( "#OrlandoUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#OrlandoInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoInitialClaimsCharts', '#orlando', 'The graph tracks total monthly unemployment claims within the Orlando MSA over time.');
});
$(document).on('pageshow', '#OrlandoInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[orlando_kissimmee]', 'Orlando Initial Claims', '', 'Orlando Initial Claims', 'orlandoInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#orlando');
});
$( "#OrlandoInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#OrlandoHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoHousePriceIndexCharts', '#orlando', 'The graph tracks the Zillow© Median Home Value Index within the Orlando MSA over time.');
});
$(document).on('pageshow', '#OrlandoHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[orlando]', 'Orlando Median Home Value', 'Thousands (USD)', 'Orlando Median Home Value', 'orlandoHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#orlando');
});
$( "#OrlandoHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#OrlandoRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoRentPriceIndexCharts', '#orlando');
});
$(document).on('pageshow', '#OrlandoRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Orlando Rent Price Index', 'Index', 'CS Index', 'orlandoRentPriceIndexCharts_container');
});
$( "#OrlandoRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#OrlandoBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoBedTaxCharts', '#orlando', 'The graph tracks monthly bed tax collections within the Orlando MSA over time.');
});
$(document).on('pageshow', '#OrlandoBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[orlando_kissimmee]', 'Orlando Bed Tax', 'Millions (USD)', 'Orlando Bed Tax', 'orlandoBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#orlando');
});
$( "#OrlandoBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#OrlandoAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoAutomobileCharts', '#orlando', 'The graph tracks the volume of auto sales occurring within the Orlando MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OrlandoAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[orlando automobile]', 'Orlando Auto Sales', 'Millions (USD)', 'Orlando Auto Sales', 'orlandoAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#orlando');
});
$( "#OrlandoAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#OrlandoDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoDurableGoodsCharts', '#orlando', 'The graph tracks the volume of durable goods sales occurring within the Orlando MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OrlandoDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[orlando durable]', 'Orlando Durable Goods', 'Millions (USD)', 'Orlando Durable Goods', 'orlandoDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#orlando');
});
$( "#OrlandoDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#OrlandoTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoTourismCharts', '#orlando', 'The graph tracks the volume of tourism sales occurring within the Orlando MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OrlandoTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[orlando tourism]', 'Orlando Tourism', 'Millions (USD)', 'Orlando Tourism', 'orlandoTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#orlando');
});
$( "#OrlandoTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#OrlandoNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoNondurableGoodsCharts', '#orlando', 'The graph tracks the volume of nondurable goods sales occurring within the Orlando MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OrlandoNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[orlando nondurable]', 'Orlando Nondurable Goods', 'Millions (USD)', 'Orlando Nondurable Goods', 'orlandoNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#orlando');
});
$( "#OrlandoNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#OrlandoConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoConstructionCharts', '#orlando', 'The graph tracks the volume of construction sales occurring within the Orlando MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OrlandoConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[orlando construction]', 'Orlando Construction', 'Millions (USD)', 'Orlando Construction', 'orlandoConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#orlando');
});
$( "#OrlandoConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#OrlandoBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoBusinessCharts', '#orlando', 'The graph tracks the volume of business investment occurring within the Orlando MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#OrlandoBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[orlando business]', 'Orlando Business Investment', 'Millions (USD)', 'Orlando Business Investment', 'orlandoBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#orlando');
});
$( "#OrlandoBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#OrlandoRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#OrlandoRetailIndexCharts', '#orlando', 'The graph tracks the value of the Orlando MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#OrlandoRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[orlando index]', 'Orlando Retail Index', '', 'Orlando Retail Index', 'orlandoRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#orlando');
});
$( "#OrlandoRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#OrlandoRetailIndexCharts');
});

//////////////// PALM BAY //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#PalmBayEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayEmploymentCharts', '#palmBay', 'The graph tracks the monthly, seasonally adjusted employment figure for the Palm Bay MSA over time.');
});
$(document).on('pageshow', '#PalmBayEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=palm_bay_melbourne_titusville', 'Palm Bay Employment (SA)', 'Thousands', 'Palm Bay Employment', 'palmBayEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#palmBay');
});
$( "#PalmBayEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#PalmBayUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayUnemploymentCharts', '#palmBay', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Palm Bay MSA over time.');
});
$(document).on('pageshow', '#PalmBayUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=palm_bay_melbourne_titusville', 'Palm Bay Unemployment Rate (SA)', '', 'Palm Bay', 'palmBayUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#palmBay');
});
$( "#PalmBayUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#PalmBayInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayInitialClaimsCharts', '#palmBay', 'The graph tracks total monthly unemployment claims within the Palm Bay MSA over time.');
});
$(document).on('pageshow', '#PalmBayInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[palm bay_melbourne_titusville]', 'Palm Bay Initial Claims', '', 'Palm Bay Initial Claims', 'palmBayInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#palmBay');
});
$( "#PalmBayInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#PalmBayHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayHousePriceIndexCharts', '#palmBay', 'The graph tracks the Zillow© Median Home Value Index within the Palm Bay MSA over time.');
});
$(document).on('pageshow', '#PalmBayHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[palm bay]', 'Palm Bay Median Home Value', 'Thousands (USD)', 'Palm Bay Median Home Value', 'palmBayHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#palmBay');
});
$( "#PalmBayHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#PalmBayRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayRentPriceIndexCharts', '#palmBay');
});
$(document).on('pageshow', '#PalmBayRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'PalmBay Rent Price Index', 'Index', 'CS Index', 'palmBayRentPriceIndexCharts_container');
});
$( "#PalmBayRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#PalmBayBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayBedTaxCharts', '#palmBay', 'The graph tracks monthly bed tax collections within the Palm Bay MSA over time.');
});
$(document).on('pageshow', '#PalmBayBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[palm bay_melbourne_titusville]', 'Palm Bay Bed Tax', 'Thousands (USD)', 'Palm Bay Bed Tax', 'palmBayBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#palmBay');
});
$( "#PalmBayBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#PalmBayAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayAutomobileCharts', '#palmBay', 'The graph tracks the volume of auto sales occurring within the Palm Bay MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmBayAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm bay_melbourne automobile]', 'Palm Bay Auto Sales', 'Millions (USD)', 'Palm Bay Auto Sales', 'palmBayAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#palmBay');
});
$( "#PalmBayAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#PalmBayDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayDurableGoodsCharts', '#palmBay', 'The graph tracks the volume of durable goods sales occurring within the Palm Bay MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmBayDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm bay_melbourne durable]', 'Palm Bay Durable Goods', 'Millions (USD)', 'Palm Bay Durable Goods', 'palmBayDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#palmBay');
});
$( "#PalmBayDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#PalmBayTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayTourismCharts', '#palmBay', 'The graph tracks the volume of tourism sales occurring within the Palm Bay MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmBayTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm bay_melbourne tourism]', 'Palm Bay Tourism', 'Millions (USD)', 'Palm Bay Tourism', 'palmBayTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#palmBay');
});
$( "#PalmBayTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#PalmBayNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayNondurableGoodsCharts', '#palmBay', 'The graph tracks the volume of nondurable goods sales occurring within the Palm Bay MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmBayNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm bay_melbourne nondurable]', 'Palm Bay Nondurable Goods', 'Millions (USD)', 'Palm Bay Nondurable Goods', 'palmBayNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#palmBay');
});
$( "#PalmBayNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#PalmBayConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayConstructionCharts', '#palmBay', 'The graph tracks the volume of construction sales occurring within the Palm Bay MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmBayConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm bay_melbourne construction]', 'Palm Bay Construction', 'Millions (USD)', 'Palm Bay Construction', 'palmBayConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#palmBay');
});
$( "#PalmBayConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#PalmBayBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayBusinessCharts', '#palmBay', 'The graph tracks the volume of business investment occurring within the Palm Bay MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmBayBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm bay_melbourne business]', 'Palm Bay Business Investment', 'Millions (USD)', 'Palm Bay Business Investment', 'palmBayBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#palmBay');
});
$( "#PalmBayBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#PalmBayRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PalmBayRetailIndexCharts', '#palmBay', 'The graph tracks the value of the Palm Bay MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#PalmBayRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[palm bay_melbourne index]', 'Palm Bay Retail Index', '', 'Palm Bay Retail Index', 'palmBayRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#palmBay');
});
$( "#PalmBayRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PalmBayRetailIndexCharts');
});

//////////////// TAMPA //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#TampaEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaEmploymentCharts', '#tampa', 'The graph tracks the monthly, seasonally adjusted employment figure for the Tampa MSA over time.');
});
$(document).on('pageshow', '#TampaEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=tampa_st_petersburg_clearwater', 'Tampa Employment (SA)', 'Thousands', 'Tampa Employment', 'tampaEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#tampa');
});
$( "#TampaEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#TampaUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaUnemploymentCharts', '#tampa', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Tampa MSA over time.');
});
$(document).on('pageshow', '#TampaUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=tampa_st_petersburg_clearwater', 'Tampa Unemployment Rate (SA)', '', 'Tampa', 'tampaUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#tampa');
});
$( "#TampaUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#TampaInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaInitialClaimsCharts', '#tampa', 'The graph tracks total monthly unemployment claims within the Tampa MSA over time.');
});
$(document).on('pageshow', '#TampaInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[tampa_st petersburg_clearwater]', 'Tampa Initial Claims', '', 'Tampa Initial Claims', 'tampaInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#tampa');
});
$( "#TampaInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#TampaHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaHousePriceIndexCharts', '#tampa', 'The graph tracks the Zillow© Median Home Value Index within the Tampa MSA over time.');
});
$(document).on('pageshow', '#TampaHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[tampa]', 'Tampa Median Home Value', 'Thousands (USD)', 'Tampa Median Home Value', 'tampaHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#tampa');
});
$( "#TampaHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#TampaRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaRentPriceIndexCharts', '#tampa');
});
$(document).on('pageshow', '#TampaRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Tampa Rent Price Index', 'Index', 'CS Index', 'tampaRentPriceIndexCharts_container');
});
$( "#TampaRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#TampaBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaBedTaxCharts', '#tampa', 'The graph tracks monthly bed tax collections within the Tampa MSA over time.');
});
$(document).on('pageshow', '#TampaBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[tampa_st petersburg_clearwater]', 'Tampa Bed Tax', 'Millions (USD)', 'Tampa Bed Tax', 'tampaBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#tampa');
});
$( "#TampaBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#TampaAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaAutomobileCharts', '#tampa', 'The graph tracks the volume of auto sales occurring within the Tampa MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TampaAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tampa automobile]', 'Tampa Auto Sales', 'Millions (USD)', 'Tampa Auto Sales', 'tampaAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#tampa');
});
$( "#TampaAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#TampaDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaDurableGoodsCharts', '#tampa', 'Durable goods measure the monthly taxable sales of all appliances, furniture, home electronics, aircraft, boat dealers, hardware and decorating stores within the Tampa MSA.');
});
$(document).on('pageshow', '#TampaDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tampa durable]', 'Tampa Durable Goods', 'Millions (USD)', 'Tampa Durable Goods', 'tampaDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#tampa');
});
$( "#TampaDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#TampaTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaTourismCharts', '#tampa', 'The graph tracks the volume of tourism sales occurring within the Tampa MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TampaTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tampa tourism]', 'Tampa Tourism', 'Millions (USD)', 'Tampa Tourism', 'tampaTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#tampa');
});
$( "#TampaTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#TampaNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaNondurableGoodsCharts', '#tampa', 'The graph tracks the volume of nondurable goods sales occurring within the Tampa MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TampaNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tampa nondurable]', 'Tampa Nondurable Goods', 'Millions (USD)', 'Tampa Nondurable Goods', 'tampaNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#tampa');
});
$( "#TampaNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#TampaConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaConstructionCharts', '#tampa', 'The graph tracks the volume of construction sales occurring within the Tampa MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TampaConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tampa construction]', 'Tampa Construction', 'Millions (USD)', 'Tampa Construction', 'tampaConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#tampa');
});
$( "#TampaConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#TampaBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaBusinessCharts', '#tampa', 'The graph tracks the volume of business investment occurring within the Tampa MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#TampaBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tampa business]', 'Tampa Business Investment', 'Millions (USD)', 'Tampa Business Investment', 'tampaBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#tampa');
});
$( "#TampaBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#TampaRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#TampaRetailIndexCharts', '#tampa', 'The graph tracks the value of the Tampa MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#TampaRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[tampa index]', 'Tampa Retail Index', '', 'Tampa Retail Index', 'tampaRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#tampa');
});
$( "#TampaRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#TampaRetailIndexCharts');
});

//////////////// LAKELAND - (WINTER HAVEN) //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#WinterHavenEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenEmploymentCharts', '#winterHaven', 'The graph tracks the monthly, seasonally adjusted employment figure for the Lakeland MSA over time.');
});
$(document).on('pageshow', '#WinterHavenEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=lakeland_winter_haven', 'Lakeland Employment (SA)', 'Thousands', 'Lakeland Employment', 'winterHavenEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#winterHaven');
});
$( "#WinterHavenEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#WinterHavenUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenUnemploymentCharts', '#winterHaven', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Lakeland MSA over time.');
});
$(document).on('pageshow', '#WinterHavenUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=lakeland_winter_haven', 'Lakeland Unemployment Rate (SA)', '', 'Lakeland', 'winterHavenUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#winterHaven');
});
$( "#WinterHavenUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#WinterHavenInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenInitialClaimsCharts', '#winterHaven', 'The graph tracks total monthly unemployment claims within the Lakeland MSA over time.');
});
$(document).on('pageshow', '#WinterHavenInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[lakeland_winter haven]', 'Lakeland Initial Claims', '', 'Lakeland Initial Claims', 'winterHavenInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#winterHaven');
});
$( "#WinterHavenInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#WinterHavenHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenHousePriceIndexCharts', '#winterHaven', 'The graph tracks the Zillow© Median Home Value Index within the Lakeland MSA over time.');
});
$(document).on('pageshow', '#WinterHavenHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[winter haven]', 'Lakeland Median Home Value', 'Thousands (USD)', 'Lakeland Median Home Value', 'winterHavenHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#winterHaven');
});
$( "#WinterHavenHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#WinterHavenRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenRentPriceIndexCharts', '#winterHaven');
});
$(document).on('pageshow', '#WinterHavenRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'WinterHaven Rent Price Index', 'Index', 'CS Index', 'winterHavenRentPriceIndexCharts_container');
});
$( "#WinterHavenRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#WinterHavenBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenBedTaxCharts', '#winterHaven', 'The graph tracks monthly bed tax collections within the Lakeland MSA over time.');
});
$(document).on('pageshow', '#WinterHavenBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[lakeland_winter haven]', 'Lakeland Bed Tax', 'Thousands (USD)', 'Lakeland Bed Tax', 'winterHavenBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#winterHaven');
});
$( "#WinterHavenBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#WinterHavenAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenAutomobileCharts', '#winterHaven', 'The graph tracks the volume of auto sales occurring within the Lakeland MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#WinterHavenAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[lakeland_winter haven automobile]', 'Lakeland Auto Sales', 'Millions (USD)', 'Lakeland Auto Sales', 'winterHavenAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#winterHaven');
});
$( "#WinterHavenAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#WinterHavenDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenDurableGoodsCharts', '#winterHaven', 'The graph tracks the volume of durable goods sales occurring within the Lakeland MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#WinterHavenDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[lakeland_winter haven durable]', 'Lakeland Durable Goods', 'Millions (USD)', 'Lakeland Durable Goods', 'winterHavenDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#winterHaven');
});
$( "#WinterHavenDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#WinterHavenTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenTourismCharts', '#winterHaven', 'The graph tracks the volume of tourism sales occurring within the Lakeland MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#WinterHavenTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[lakeland_winter haven tourism]', 'Lakeland Tourism', 'Millions (USD)', 'Lakeland Tourism', 'winterHavenTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#winterHaven');
});
$( "#WinterHavenTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#WinterHavenNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenNondurableGoodsCharts', '#winterHaven', 'The graph tracks the volume of nondurable goods sales occurring within the Lakeland MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#WinterHavenNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[lakeland_winter haven nondurable]', 'Lakeland Nondurable Goods', 'Millions (USD)', 'Lakeland Nondurable Goods', 'winterHavenNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#winterHaven');
});
$( "#WinterHavenNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#WinterHavenConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenConstructionCharts', '#winterHaven', 'The graph tracks the volume of construction sales occurring within the Lakeland MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#WinterHavenConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[lakeland_winter haven construction]', 'Lakeland Construction', 'Millions (USD)', 'Lakeland Construction', 'winterHavenConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#winterHaven');
});
$( "#WinterHavenConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#WinterHavenBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenBusinessCharts', '#winterHaven', 'The graph tracks the volume of business investment occurring within the Lakeland MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#WinterHavenBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[lakeland_winter haven business]', 'Lakeland Business Investment', 'Millions (USD)', 'Lakeland Business Investment', 'winterHavenBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#winterHaven');
});
$( "#WinterHavenBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#WinterHavenRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#WinterHavenRetailIndexCharts', '#winterHaven', 'The graph tracks the value of the Lakeland MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#WinterHavenRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[lakeland_winter haven index]', 'Lakeland Retail Index', '', 'Lakeland Retail Index', 'winterHavenRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#winterHaven');
});
$( "#WinterHavenRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#WinterHavenRetailIndexCharts');
});

//////////////// SEBASTIAN - (VERO BEACH) //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#VeroBeachEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachEmploymentCharts', '#veroBeach', 'The graph tracks the monthly, seasonally adjusted employment figure for the Sebastian MSA over time.');
});
$(document).on('pageshow', '#VeroBeachEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=sebastian_vero_beach', 'Sebastian Employment (SA)', 'Thousands', 'Sebastian Employment', 'veroBeachEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#veroBeach');
});
$( "#VeroBeachEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#VeroBeachUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachUnemploymentCharts', '#veroBeach', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Sebastian MSA over time.');
});
$(document).on('pageshow', '#VeroBeachUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=sebastian_vero_beach', 'Sebastian Unemployment Rate (SA)', '', 'Sebastian', 'veroBeachUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#veroBeach');
});
$( "#VeroBeachUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#VeroBeachInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachInitialClaimsCharts', '#veroBeach', 'The graph tracks total monthly unemployment claims within the Sebastian MSA over time.');
});
$(document).on('pageshow', '#VeroBeachInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[sebastian_vero beach]', 'Sebastian Initial Claims', '', 'Sebastian Initial Claims', 'veroBeachInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#veroBeach');
});
$( "#VeroBeachInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#VeroBeachHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachHousePriceIndexCharts', '#veroBeach', 'The graph tracks the Zillow© Median Home Value Index within the Sebastian MSA over time.');
});
$(document).on('pageshow', '#VeroBeachHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[vero beach]', 'Sebastian Median Home Value', 'Thousands (USD)', 'Sebastian Median Home Value', 'veroBeachHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#veroBeach');
});
$( "#VeroBeachHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#VeroBeachRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachRentPriceIndexCharts', '#veroBeach');
});
$(document).on('pageshow', '#VeroBeachRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'VeroBeach Rent Price Index', 'Index', 'CS Index', 'veroBeachRentPriceIndexCharts_container');
});
$( "#VeroBeachRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#VeroBeachBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachBedTaxCharts', '#veroBeach', 'The graph tracks monthly bed tax collections within the Sebastian MSA over time.');
});
$(document).on('pageshow', '#VeroBeachBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[sebastian_vero beach]', 'Sebastian Bed Tax', 'Thousands (USD)', 'Sebastian Bed Tax', 'veroBeachBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#veroBeach');
});
$( "#VeroBeachBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#VeroBeachAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachAutomobileCharts', '#veroBeach', 'The graph tracks the volume of auto sales occurring within the Sebastian MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#VeroBeachAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sebastian_vero beach automobile]', 'Sebastian Auto Sales', 'Millions (USD)', 'Sebastian Auto Sales', 'veroBeachAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#veroBeach');
});
$( "#VeroBeachAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#VeroBeachDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachDurableGoodsCharts', '#veroBeach', 'The graph tracks the volume of durable goods sales occurring within the Sebastian MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#VeroBeachDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sebastian_vero beach durable]', 'Sebastian Durable Goods', 'Millions (USD)', 'Sebastian Durable Goods', 'veroBeachDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#veroBeach');
});
$( "#VeroBeachDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#VeroBeachTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachTourismCharts', '#veroBeach', 'The graph tracks the volume of tourism sales occurring within the Sebastian MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#VeroBeachTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sebastian_vero beach tourism]', 'Sebastian Tourism', 'Millions (USD)', 'Sebastian Tourism', 'veroBeachTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#veroBeach');
});
$( "#VeroBeachTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#VeroBeachNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachNondurableGoodsCharts', '#veroBeach', 'The graph tracks the volume of nondurable goods sales occurring within the Sebastian MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#VeroBeachNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sebastian_vero beach nondurable]', 'Sebastian Nondurable Goods', 'Millions (USD)', 'Sebastian Nondurable Goods', 'veroBeachNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#veroBeach');
});
$( "#VeroBeachNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#VeroBeachConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachConstructionCharts', '#veroBeach', 'The graph tracks the volume of construction sales occurring within the Sebastian MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#VeroBeachConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sebastian_vero beach construction]', 'Sebastian Construction', 'Millions (USD)', 'Sebastian Construction', 'veroBeachConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#veroBeach');
});
$( "#VeroBeachConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#VeroBeachBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachBusinessCharts', '#veroBeach', 'The graph tracks the volume of business investment occurring within the Sebastian MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#VeroBeachBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sebastian_vero beach business]', 'Sebastian Business Investment', 'Millions (USD)', 'Sebastian Business Investment', 'veroBeachBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#veroBeach');
});
$( "#VeroBeachBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#VeroBeachRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#VeroBeachRetailIndexCharts', '#veroBeach', 'The graph tracks the value of the Sebastian MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#VeroBeachRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sebastian_vero beach index]', 'Sebastian Retail Index', '', 'Sebastian Retail Index', 'veroBeachRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#veroBeach');
});
$( "#VeroBeachRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#VeroBeachRetailIndexCharts');
});

//////////////// CAPE CORAL - (FORT MYERS) //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#FortMyersEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersEmploymentCharts', '#fortMyers', 'The graph tracks the monthly, seasonally adjusted employment figure for the Cape Coral MSA over time.');
});
$(document).on('pageshow', '#FortMyersEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=cape_coral_fort_myers', 'Cape Coral Employment (SA)', 'Thousands', 'Cape Coral Employment', 'fortMyersEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#fortMyers');
});
$( "#FortMyersEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#FortMyersUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersUnemploymentCharts', '#fortMyers', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Cape Coral MSA over time.');
});
$(document).on('pageshow', '#FortMyersUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=cape_coral_fort_myers', 'Cape Coral Unemployment Rate (SA)', '', 'Cape Coral', 'fortMyersUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#fortMyers');
});
$( "#FortMyersUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#FortMyersInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersInitialClaimsCharts', '#fortMyers', 'The graph tracks total monthly unemployment claims within the Cape Coral MSA over time.');
});
$(document).on('pageshow', '#FortMyersInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[cape coral_fort myers]', 'Cape Coral Initial Claims', '', 'Cape Coral Initial Claims', 'fortMyersInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#fortMyers');
});
$( "#FortMyersInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#FortMyersHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersHousePriceIndexCharts', '#fortMyers', 'The graph tracks the Zillow© Median Home Value Index within the Cape Coral MSA over time.');
});
$(document).on('pageshow', '#FortMyersHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[fort myers]', 'Cape Coral Median Home Value', 'Thousands (USD)', 'Cape Coral Median Home Value', 'fortMyersHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#fortMyers');
});
$( "#FortMyersHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersHousePriceIndexCharts');
});

///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#FortMyersRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersRentPriceIndexCharts', '#fortMyers');
});
$(document).on('pageshow', '#FortMyersRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'FortMyers Rent Price Index', 'Index', 'CS Index', 'fortMyersRentPriceIndexCharts_container');
});
$( "#FortMyersRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#FortMyersBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersBedTaxCharts', '#fortMyers', 'The graph tracks monthly bed tax collections within the Cape Coral MSA over time.');
});
$(document).on('pageshow', '#FortMyersBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[cape coral_fort myers]', 'Cape Coral Bed Tax', 'Thousands (USD)', 'Cape Coral Bed Tax', 'fortMyersBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#fortMyers');
});
$( "#FortMyersBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#FortMyersAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersAutomobileCharts', '#fortMyers', 'The graph tracks the volume of auto sales occurring within the Cape Coral MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#FortMyersAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[cape coral_fort myers automobile]', 'Cape Coral Auto Sales', 'Millions (USD)', 'Cape Coral Auto Sales', 'fortMyersAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#fortMyers');
});
$( "#FortMyersAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#FortMyersDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersDurableGoodsCharts', '#fortMyers', 'The graph tracks the volume of durable goods sales occurring within the Cape Coral MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#FortMyersDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[cape coral_fort myers durable]', 'Cape Coral Durable Goods', 'Millions (USD)', 'Cape Coral Durable Goods', 'fortMyersDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#fortMyers');
});
$( "#FortMyersDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#FortMyersTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersTourismCharts', '#fortMyers', 'The graph tracks the volume of tourism sales occurring within the Cape Coral MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#FortMyersTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[cape coral_fort myers tourism]', 'Cape Coral Tourism', 'Millions (USD)', 'Cape Coral Tourism', 'fortMyersTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#fortMyers');
});
$( "#FortMyersTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#FortMyersNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersNondurableGoodsCharts', '#fortMyers', 'The graph tracks the volume of nondurable goods sales occurring within the Cape Coral MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#FortMyersNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[cape coral_fort myers nondurable]', 'Cape Coral Nondurable Goods', 'Millions (USD)', 'Cape Coral Nondurable Goods', 'fortMyersNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#fortMyers');
});
$( "#FortMyersNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#FortMyersConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersConstructionCharts', '#fortMyers', 'The graph tracks the volume of construction sales occurring within the Cape Coral MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#FortMyersConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[cape coral_fort myers construction]', 'Cape Coral Construction', 'Millions (USD)', 'Cape Coral Construction', 'fortMyersConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#fortMyers');
});
$( "#FortMyersConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#FortMyersBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersBusinessCharts', '#fortMyers', 'The graph tracks the volume of business investment occurring within the Cape Coral MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#FortMyersBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[cape coral_fort myers business]', 'Cape Coral Business Investment', 'Millions (USD)', 'Cape Coral Business Investment', 'fortMyersBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#fortMyers');
});
$( "#FortMyersBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#FortMyersRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#FortMyersRetailIndexCharts', '#fortMyers', 'The graph tracks the value of the Cape Coral MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#FortMyersRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[cape coral_fort myers index]', 'Cape Coral Retail Index', '', 'Cape Coral Retail Index', 'fortMyersRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#fortMyers');
});
$( "#FortMyersRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#FortMyersRetailIndexCharts');
});

//////////////// MIAMI//////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#MiamiEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiEmploymentCharts', '#miami', 'The graph tracks the monthly, seasonally adjusted employment figure for the Miami MSA over time.');
});
$(document).on('pageshow', '#MiamiEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=miami_fort_lauderdale_miami_beach', 'Miami Employment (SA)', 'Thousands', 'Miami Employment', 'miamiEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#miami');
});
$( "#MiamiEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#MiamiUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiUnemploymentCharts', '#miami', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Miami MSA over time.');
});
$(document).on('pageshow', '#MiamiUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=miami_fort_lauderdale_miami_beach', 'Miami Unemployment Rate (SA)', '', 'Miami', 'miamiUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#miami');
});
$( "#MiamiUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#MiamiInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiInitialClaimsCharts', '#miami', 'The graph tracks total monthly unemployment claims within the Miami MSA over time.');
});
$(document).on('pageshow', '#MiamiInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[miami]', 'Miami Initial Claims', '', 'Miami Initial Claims', 'miamiInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#miami');
});
$( "#MiamiInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#MiamiHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiHousePriceIndexCharts', '#miami', 'The graph tracks the Zillow© Median Home Value Index within the Miami MSA over time.');
});
$(document).on('pageshow', '#MiamiHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[miami]', 'Miami Median Home Value', 'Thousands (USD)', 'Miami Median Home Value', 'miamiHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#miami');
});
$( "#MiamiHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#MiamiRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiRentPriceIndexCharts', '#miami');
});
$(document).on('pageshow', '#MiamiRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Miami Rent Price Index', 'Index', 'CS Index', 'miamiRentPriceIndexCharts_container');
});
$( "#MiamiRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#MiamiBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiBedTaxCharts', '#miami', 'The graph tracks monthly bed tax collections within the Miami MSA over time.');
});
$(document).on('pageshow', '#MiamiBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[miami]', 'Miami Bed Tax', 'Millions (USD)', 'Miami Bed Tax', 'miamiBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#miami');
});
$( "#MiamiBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#MiamiAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiAutomobileCharts', '#miami', 'The graph tracks the volume of auto sales occurring within the Miami MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#MiamiAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[miami automobile]', 'Miami Auto Sales', 'Millions (USD)', 'Miami Auto Sales', 'miamiAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#miami');
});
$( "#MiamiAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#MiamiDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiDurableGoodsCharts', '#miami', 'The graph tracks the volume of durable goods sales occurring within the Miami MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#MiamiDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[miami durable]', 'Miami Durable Goods', 'Millions (USD)', 'Miami Durable Goods', 'miamiDurableGoodsCharts_container', '', '' , 'Florida Department of Revenue', '', '#miami');
});
$( "#MiamiDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#MiamiTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiTourismCharts', '#miami', 'The graph tracks the volume of tourism sales occurring within the Miami MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#MiamiTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[miami tourism]', 'Miami Tourism', 'Millions (USD)', 'Miami Tourism', 'miamiTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#miami');
});
$( "#MiamiTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#MiamiNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiNondurableGoodsCharts', '#miami', 'The graph tracks the volume of nondurable goods sales occurring within the Miami MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#MiamiNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[miami nondurable]', 'Miami Nondurable Goods', 'Millions (USD)', 'Miami Nondurable Goods', 'miamiNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#miami');
});
$( "#MiamiNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#MiamiConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiConstructionCharts', '#miami', 'The graph tracks the volume of construction sales occurring within the Miami MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#MiamiConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[miami construction]', 'Miami Construction', 'Millions (USD)', 'Miami Construction', 'miamiConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#miami');
});
$( "#MiamiConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#MiamiBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiBusinessCharts', '#miami', 'The graph tracks the volume of business investment occurring within the Miami MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#MiamiBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[miami business]', 'Miami Business Investment', 'Millions (USD)', 'Miami Business Investment', 'miamiBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#miami');
});
$( "#MiamiBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#MiamiRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#MiamiRetailIndexCharts', '#miami', 'The graph tracks the value of the Miami MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#MiamiRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[miami index]', 'Miami Retail Index', '', 'Miami Retail Index', 'miamiRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#miami');
});
$( "#MiamiRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#MiamiRetailIndexCharts');
});

//////////////// NAPLES //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#NaplesEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesEmploymentCharts', '#naples', 'The graph tracks the monthly, seasonally adjusted employment figure for the Naples MSA over time.');
});
$(document).on('pageshow', '#NaplesEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=naples_marco_island', 'Naples Employment (SA)', 'Thousands', 'Naples Employment', 'naplesEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#naples');
});
$( "#NaplesEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#NaplesUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesUnemploymentCharts', '#naples', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Naples MSA over time.');
});
$(document).on('pageshow', '#NaplesUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=naples_marco_island', 'Naples Unemployment Rate (SA)', '', 'Naples', 'naplesUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#naples');
});
$( "#NaplesUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#NaplesInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesInitialClaimsCharts', '#naples', 'The graph tracks total monthly unemployment claims within the Naples MSA over time.');
});
$(document).on('pageshow', '#NaplesInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[naples_marco island]', 'Naples Initial Claims', '', 'Naples Initial Claims', 'naplesInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#naples');
});
$( "#NaplesInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#NaplesHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesHousePriceIndexCharts', '#naples', 'The graph tracks the Zillow© Median Home Value Index within the Naples MSA over time.');
});
$(document).on('pageshow', '#NaplesHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[naples]', 'Naples Median Home Value', 'Thousands (USD)', 'Naples Median Home Value', 'naplesHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#naples');
});
$( "#NaplesHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#NaplesRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesRentPriceIndexCharts', '#naples');
});
$(document).on('pageshow', '#NaplesRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Naples Rent Price Index', 'Index', 'CS Index', 'naplesRentPriceIndexCharts_container');
});
$( "#NaplesRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#NaplesBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesBedTaxCharts', '#naples', 'The graph tracks monthly bed tax collections within the Naples MSA over time.');
});
$(document).on('pageshow', '#NaplesBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[naples_marco island]', 'Naples Bed Tax', 'Thousands (USD)', 'Naples Bed Tax', 'naplesBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#naples');
});
$( "#NaplesBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#NaplesAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesAutomobileCharts', '#naples', 'The graph tracks the volume of auto sales occurring within the Naples MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#NaplesAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[naples automobile]', 'Naples Auto Sales', 'Millions (USD)', 'Naples Auto Sales', 'naplesAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#naples');
});
$( "#NaplesAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#NaplesDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesDurableGoodsCharts', '#naples', 'The graph tracks the volume of durable goods sales occurring within the Naples MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#NaplesDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[naples durable]', 'Naples Durable Goods', 'Millions (USD)', 'Naples Durable Goods', 'naplesDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#naples');
});
$( "#NaplesDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#NaplesTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesTourismCharts', '#naples', 'The graph tracks the volume of tourism sales occurring within the Naples MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#NaplesTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[naples tourism]', 'Naples Tourism', 'Millions (USD)', 'Naples Tourism', 'naplesTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#naples');
});
$( "#NaplesTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#NaplesNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesNondurableGoodsCharts', '#naples', 'The graph tracks the volume of nondurable goods sales occurring within the Naples MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#NaplesNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[naples nondurable]', 'Naples Nondurable Goods', 'Millions (USD)', 'Naples Nondurable Goods', 'naplesNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#naples');
});
$( "#NaplesNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#NaplesConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesConstructionCharts', '#naples', 'The graph tracks the volume of construction sales occurring within the Naples MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#NaplesConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[naples construction]', 'Naples Construction', 'Millions (USD)', 'Naples Construction', 'naplesConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#naples');
});
$( "#NaplesConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#NaplesBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesBusinessCharts', '#naples', 'The graph tracks the volume of business investment occurring within the Naples MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#NaplesBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[naples business]', 'Naples Business Investment', 'Millions (USD)', 'Naples Business Investment', 'naplesBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#naples');
});
$( "#NaplesBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#NaplesRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#NaplesRetailIndexCharts', '#naples', 'The graph tracks the value of the Naples MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#NaplesRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[naples index]', 'Naples Retail Index', '', 'Naples Retail Index', 'naplesRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#naples');
});
$( "#NaplesRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#NaplesRetailIndexCharts');
});

//////////////// PORT ST LUCIE //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#PortStLucieEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieEmploymentCharts', '#portStLucie', 'The graph tracks the monthly, seasonally adjusted employment figure for the Port St. Lucie MSA over time.');
});
$(document).on('pageshow', '#PortStLucieEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=port_st_lucie_fort_pierce', 'Port St. Lucie Employment (SA)', 'Thousands', 'Port St. Lucie Employment', 'portStLucieEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#portStLucie');
});
$( "#PortStLucieEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#PortStLucieUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieUnemploymentCharts', '#portStLucie', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Port St. Lucie MSA over time.');
});
$(document).on('pageshow', '#PortStLucieUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=port_st_lucie_fort_pierce', 'Port St. Lucie Unemployment Rate (SA)', '', 'Port St. Lucie', 'portStLucieUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#portStLucie');
});
$( "#PortStLucieUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#PortStLucieInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieInitialClaimsCharts', '#portStLucie', 'The graph tracks total monthly unemployment claims within the Port St. Lucie MSA over time.');
});
$(document).on('pageshow', '#PortStLucieInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[port st lucie]', 'Port St. Lucie Initial Claims', '', 'Port St. Lucie Initial Claims', 'portStLucieInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#portStLucie');
});
$( "#PortStLucieInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#PortStLucieHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieHousePriceIndexCharts', '#portStLucie', 'The graph tracks the Zillow© Median Home Value Index within the Port St. Lucie MSA over time.');
});
$(document).on('pageshow', '#PortStLucieHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[port st lucie]', 'Port St. Lucie Median Home Value', 'Thousands (USD)', 'Port St. Lucie Median Home Value', 'portStLucieHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#portStLucie');
});
$( "#PortStLucieHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#PortStLucieRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieRentPriceIndexCharts', '#portStLucie');
});
$(document).on('pageshow', '#PortStLucieRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'PortStLucie Rent Price Index', 'Index', 'CS Index', 'portStLucieRentPriceIndexCharts_container');
});
$( "#PortStLucieRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#PortStLucieBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieBedTaxCharts', '#portStLucie', 'The graph tracks monthly bed tax collections within the Port St. Lucie MSA over time.');
});
$(document).on('pageshow', '#PortStLucieBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[port st lucie]', 'Port St. Lucie Bed Tax', 'Thousands (USD)', 'Port St. Lucie Bed Tax', 'portStLucieBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#portStLucie');
});
$( "#PortStLucieBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#PortStLucieAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieAutomobileCharts', '#portStLucie', 'The graph tracks the volume of auto sales occurring within the Port St. Lucie MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PortStLucieAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[port st lucie automobile]', 'Port St. Lucie Auto Sales', 'Millions (USD)', 'Port St. Lucie Auto Sales', 'portStLucieAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#portStLucie');
});
$( "#PortStLucieAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#PortStLucieDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieDurableGoodsCharts', '#portStLucie', 'The graph tracks the volume of durable goods sales occurring within the Port St. Lucie MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PortStLucieDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[port st lucie durable]', 'Port St. Lucie Durable Goods', 'Millions (USD)', 'Port St. Lucie Durable Goods', 'portStLucieDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#portStLucie');
});
$( "#PortStLucieDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#PortStLucieTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieTourismCharts', '#portStLucie', 'The graph tracks the volume of tourism sales occurring within the Port St. Lucie MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PortStLucieTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[port st lucie tourism]', 'Port St. Lucie Tourism', 'Millions (USD)', 'Port St. Lucie Tourism', 'portStLucieTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#portStLucie');
});
$( "#PortStLucieTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#PortStLucieNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieNondurableGoodsCharts', '#portStLucie', 'The graph tracks the volume of nondurable goods sales occurring within the Port St. Lucie MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PortStLucieNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[port st lucie nondurable]', 'Port St. Lucie Nondurable Goods', 'Millions (USD)', 'Port St. Lucie Nondurable Goods', 'portStLucieNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#portStLucie');
});
$( "#PortStLucieNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#PortStLucieConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieConstructionCharts', '#portStLucie', 'The graph tracks the volume of construction sales occurring within the Port St. Lucie MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PortStLucieConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[port st lucie construction]', 'Port St. Lucie Construction', 'Millions (USD)', 'Port St. Lucie Construction', 'portStLucieConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#portStLucie');
});
$( "#PortStLucieConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#PortStLucieBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieBusinessCharts', '#portStLucie', 'The graph tracks the volume of business investment occurring within the Port St. Lucie MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PortStLucieBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[port st lucie business]', 'Port St. Lucie Business Investment', 'Millions (USD)', 'Port St. Lucie Business Investment', 'portStLucieBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#portStLucie');
});
$( "#PortStLucieBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#PortStLucieRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PortStLucieRetailIndexCharts', '#portStLucie', 'The graph tracks the value of the Port St. Lucie MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#PortStLucieRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[port st lucie index]', 'Port St. Lucie Retail Index', '', 'Port St. Lucie Retail Index', 'portStLucieRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#portStLucie');
});
$( "#PortStLucieRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PortStLucieRetailIndexCharts');
});

//////////////// PUNTA GORDA //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#PuntaGordaEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaEmploymentCharts', '#puntaGorda', 'The graph tracks the monthly, season adjusted employment figure for the Punta Gorda MSA over time.');
});
$(document).on('pageshow', '#PuntaGordaEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=punta_gorda', 'Punta Gorda Employment (SA)', 'Thousands', 'Punta Gorda Employment', 'puntaGordaEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#puntaGorda');
});
$( "#PuntaGordaEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#PuntaGordaUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaUnemploymentCharts', '#puntaGorda', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the Punta Gorda MSA over time.');
});
$(document).on('pageshow', '#PuntaGordaUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=punta_gorda', 'Punta Gorda Unemployment Rate (SA)', '', 'Punta Gorda', 'puntaGordaUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#puntaGorda');
});
$( "#PuntaGordaUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#PuntaGordaInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaInitialClaimsCharts', '#puntaGorda', 'The graph tracks total monthly unemployment claims within the Punta Gorda MSA over time.');
});
$(document).on('pageshow', '#PuntaGordaInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[punta gorda]', 'Punta Gorda Initial Claims', '', 'Punta Gorda Initial Claims', 'puntaGordaInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#puntaGorda');
});
$( "#PuntaGordaInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#PuntaGordaHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaHousePriceIndexCharts', '#puntaGorda', 'The graph tracks the Zillow© Median Home Value Index within the Punta Gorda MSA over time.');
});
$(document).on('pageshow', '#PuntaGordaHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[punta gorda]', 'Punta Gorda Median Home Value', 'Thousands (USD)', 'Punta Gorda Median Home Value', 'puntaGordaHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#puntaGorda');
});
$( "#PuntaGordaHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#PuntaGordaRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaRentPriceIndexCharts', '#puntaGorda');
});
$(document).on('pageshow', '#PuntaGordaRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'PuntaGorda Rent Price Index', 'Index', 'CS Index', 'puntaGordaRentPriceIndexCharts_container');
});
$( "#PuntaGordaRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#PuntaGordaBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaBedTaxCharts', '#puntaGorda', 'The graph tracks monthly bed tax collections within the Punta Gorda MSA over time.');
});
$(document).on('pageshow', '#PuntaGordaBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[punta gorda]', 'Punta Gorda Bed Tax', 'Thousands (USD)', 'Punta Gorda Bed Tax', 'puntaGordaBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#puntaGorda');
});
$( "#PuntaGordaBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#PuntaGordaAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaAutomobileCharts', '#puntaGorda', 'The graph tracks the volume of auto sales occurring within the Punta Gorda MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PuntaGordaAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[punta gorda automobile]', 'Punta Gorda Auto Sales', 'Millions (USD)', 'Punta Gorda Auto Sales', 'puntaGordaAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#puntaGorda');
});
$( "#PuntaGordaAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#PuntaGordaDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaDurableGoodsCharts', '#puntaGorda', 'The graph tracks the volume of durable goods sales occurring within the Punta Gorda MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PuntaGordaDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[punta gorda durable]', 'Punta Gorda Durable Goods', 'Millions (USD)', 'Punta Gorda Durable Goods', 'puntaGordaDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#puntaGorda');
});
$( "#PuntaGordaDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#PuntaGordaTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaTourismCharts', '#puntaGorda', 'The graph tracks the volume of tourism sales occurring within the Punta Gorda MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PuntaGordaTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[punta gorda tourism]', 'Punta Gorda Tourism', 'Millions (USD)', 'Punta Gorda Tourism', 'puntaGordaTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#puntaGorda');
});
$( "#PuntaGordaTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#PuntaGordaNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaNondurableGoodsCharts', '#puntaGorda', 'The graph tracks the volume of nondurable goods sales occurring within the Punta Gorda MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PuntaGordaNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[punta gorda nondurable]', 'Punta Gorda Nondurable Goods', 'Millions (USD)', 'Punta Gorda Nondurable Goods', 'puntaGordaNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#puntaGorda');
});
$( "#PuntaGordaNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#PuntaGordaConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaConstructionCharts', '#puntaGorda', 'The graph tracks the volume of construction sales occurring within the Punta Gorda MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PuntaGordaConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[punta gorda construction]', 'Punta Gorda Construction', 'Millions (USD)', 'Punta Gorda Construction', 'puntaGordaConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#puntaGorda');
});
$( "#PuntaGordaConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#PuntaGordaBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaBusinessCharts', '#puntaGorda', 'The graph tracks the volume of business investment occurring within the Punta Gorda MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#PuntaGordaBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[punta gorda business]', 'Punta Gorda Business Investment', 'Millions (USD)', 'Punta Gorda Business Investment', 'puntaGordaBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#puntaGorda');
});
$( "#PuntaGordaBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#PuntaGordaRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#PuntaGordaRetailIndexCharts', '#puntaGorda', 'The graph tracks the value of the Punta Gorda MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#PuntaGordaRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[punta gorda index]', 'Punta Gorda Retail Index', '', 'Punta Gorda Retail Index', 'puntaGordaRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#puntaGorda');
});
$( "#PuntaGordaRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#PuntaGordaRetailIndexCharts');
});

//////////////// NORTH PORT - (SARASOTA) //////////////////
/////////////////////////////////// EMPLOYMENT /////////////////////////////////////////
$( "#SarasotaEmploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaEmploymentCharts', '#sarasota', 'The graph tracks the monthly, seasonally adjusted employment figure for the North Port MSA over time.');
});
$(document).on('pageshow', '#SarasotaEmploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaemployment&column=north_port_bradenton_sarasota', 'North Port Employment (SA)', 'Thousands', 'North Port Employment', 'sarasotaEmploymentCharts_container', '','', 'US Bureau of Labor Statistics (BLS)', '', '#sarasota');
});
$( "#SarasotaEmploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaEmploymentCharts');
});
/////////////////////////////////// UNEMPLOYMENT /////////////////////////////////////////
$( "#SarasotaUnemploymentCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaUnemploymentCharts', '#sarasota', 'The graph tracks the monthly, seasonally adjusted unemployment rate within the North Port MSA over time.');
});
$(document).on('pageshow', '#SarasotaUnemploymentCharts', function(){  
	generateCharts(serverUrl + 'table=msaunemployment&column=north_port_bradenton_sarasota', 'North Port Unemployment Rate (SA)', '', 'North Port', 'sarasotaUnemploymentCharts_container', 'msa', 'true', 'US Bureau of Labor Statistics (BLS)', '', '#sarasota');
});
$( "#SarasotaUnemploymentCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaUnemploymentCharts');
});
/////////////////////////////////// Initial Claims /////////////////////////////////////////
$( "#SarasotaInitialClaimsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaInitialClaimsCharts', '#sarasota', 'The graph tracks total monthly unemployment claims within the North Port MSA over time.');
});
$(document).on('pageshow', '#SarasotaInitialClaimsCharts', function(){  
	generateCharts(serverUrl + 'table=initialclaims&column=[bradenton_sarasota_venice]', 'North Port Initial Claims', '', 'North Port Initial Claims', 'sarasotaInitialClaimsCharts_container', '', '', 'Florida Department of Economic Opportunity', '', '#sarasota');
});
$( "#SarasotaInitialClaimsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaInitialClaimsCharts');
});
///////////////////////////////////// Median House Price /////////////////////////////////////////
$( "#SarasotaHousePriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaHousePriceIndexCharts', '#sarasota', 'The graph tracks the Zillow© Median Home Value Index within the North Point MSA over time.');
});
$(document).on('pageshow', '#SarasotaHousePriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=medianhousezillow&column=[sarasota]', 'North Port Median Home Value', 'Thousands (USD)', 'North Port Median Home Value', 'sarasotaHousePriceIndexCharts_container', '', '', 'Zillow Real Estate Research', '', '#sarasota');
});
$( "#SarasotaHousePriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaHousePriceIndexCharts');
});
///////////////////////////////////// RENT PRICE INDEX /////////////////////////////////////////
/*$( "#SarasotaRentPriceIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaRentPriceIndexCharts', '#sarasota');
});
$(document).on('pageshow', '#SarasotaRentPriceIndexCharts', function(){  
	generateCharts(serverUrl + 'table=nationmonthly&column=case_shiller_home_price_index', 'Sarasota Rent Price Index', 'Index', 'CS Index', 'sarasotaRentPriceIndexCharts_container');
});
$( "#SarasotaRentPriceIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaRentPriceIndexCharts');
});*/
/////////////////////////////////// BED TAX /////////////////////////////////////////
$( "#SarasotaBedTaxCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaBedTaxCharts', '#sarasota', 'The graph tracks monthly bed tax collections within the North Port MSA over time.');
});
$(document).on('pageshow', '#SarasotaBedTaxCharts', function(){  
	generateCharts(serverUrl + 'table=FLBedTaxMSA&column=[bradenton_sarasota_venice]', 'North Port Bed Tax', 'Thousands (USD)', 'North Port Bed Tax', 'sarasotaBedTaxCharts_container', '', '', 'Florida Department of Revenue', '', '#sarasota');
});
$( "#SarasotaBedTaxCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaBedTaxCharts');
});
/////////////////////////////////// AUTOMOBILE /////////////////////////////////////////
$( "#SarasotaAutomobileCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaAutomobileCharts', '#sarasota', 'The graph tracks the volume of auto sales occurring within the North Port MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#SarasotaAutomobileCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sarasota automobile]', 'North Port Auto Sales', 'Millions (USD)', 'North Port Auto Sales', 'sarasotaAutomobileCharts_container', '', '', 'Florida Department of Revenue', '', '#sarasota');
});
$( "#SarasotaAutomobileCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaAutomobileCharts');
});
/////////////////////////////////// DURABLE GOODS /////////////////////////////////////////
$( "#SarasotaDurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaDurableGoodsCharts', '#sarasota', 'The graph tracks the volume of durable goods sales occurring within the North Port MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#SarasotaDurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sarasota durable]', 'North Port Durable Goods', 'Millions (USD)', 'North Port Durable Goods', 'sarasotaDurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#sarasota');
});
$( "#SarasotaDurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaDurableGoodsCharts');
});
/////////////////////////////////// TOURISM /////////////////////////////////////////
$( "#SarasotaTourismCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaTourismCharts', '#sarasota', 'The graph tracks the volume of tourism sales occurring within the North Port MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#SarasotaTourismCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sarasota tourism]', 'North Port Tourism', 'Millions (USD)', 'North Port Tourism', 'sarasotaTourismCharts_container', '', '', 'Florida Department of Revenue', '', '#sarasota');
});
$( "#SarasotaTourismCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaTourismCharts');
});
/////////////////////////////////// NONDURABLE GOODS /////////////////////////////////////////
$( "#SarasotaNondurableGoodsCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaNondurableGoodsCharts', '#sarasota', 'The graph tracks the volume of nondurable goods sales occurring within the North Port MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#SarasotaNondurableGoodsCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sarasota nondurable]', 'North Port Nondurable Goods', 'Millions (USD)', 'North Port Nondurable Goods', 'sarasotaNondurableGoodsCharts_container', '', '', 'Florida Department of Revenue', '', '#sarasota');
});
$( "#SarasotaNondurableGoodsCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaNondurableGoodsCharts');
});
/////////////////////////////////// CONSTRUCTION /////////////////////////////////////////
$( "#SarasotaConstructionCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaConstructionCharts', '#sarasota', 'The graph tracks the volume of construction sales occurring within the North Port MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#SarasotaConstructionCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sarasota construction]', 'North Port Construction', 'Millions (USD)', 'North Port Construction', 'sarasotaConstructionCharts_container', '', '', 'Florida Department of Revenue', '', '#sarasota');
});
$( "#SarasotaConstructionCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaConstructionCharts');
});
/////////////////////////////////// BUSINESS /////////////////////////////////////////
$( "#SarasotaBusinessCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaBusinessCharts', '#sarasota', 'The graph tracks the volume of business investment occurring within the North Port MSA on a monthly basis over time.');
});
$(document).on('pageshow', '#SarasotaBusinessCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sarasota business]', 'North Port Business Investment', 'Millions (USD)', 'North Port Business Investment', 'sarasotaBusinessCharts_container', '', '', 'Florida Department of Revenue', '', '#sarasota');
});
$( "#SarasotaBusinessCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaBusinessCharts');
});
/////////////////////////////////// RETAIL INDEX /////////////////////////////////////////
$( "#SarasotaRetailIndexCharts" ).on( "pagebeforecreate", function( event ) {
	generateFooter('#SarasotaRetailIndexCharts', '#sarasota', 'The graph tracks the value of the North Port MSA Retail Index on a monthly basis over time.');
});
$(document).on('pageshow', '#SarasotaRetailIndexCharts', function(){  
	generateCharts(serverUrl + 'table=FLSalesByMSA&column=[sarasota index]', 'North Port Retail Index', '', 'North Port Retail Index', 'sarasotaRetailIndexCharts_container', '', '', 'Florida Department of Revenue', '', '#sarasota');
});
$( "#SarasotaRetailIndexCharts" ).on( "pagebeforehide", function( event ) {
	removeElements('#SarasotaRetailIndexCharts');
});






//////////////GENERAL FUNCTIONS//////////////

function generateFooter(page, backBrowse, infoMessage)
{
	//console.log(page+": inserting footer");
	var htmlElements = "\
        <div data-role=\"popup\" id=\"button3\" class=\"ui-content\" style=\"max-width:280px\">\
        	<a href=\"#\" data-rel=\"back\" data-role=\"button\"  data-theme=\"a\" data-icon=\"delete\" data-iconpos=\"notext\" class=\"ui-btn-right\" >close</a>\
            <p>"+infoMessage+"</p>\
        </div>\
   <div data-role=\"footer\" style=\"overflow:hidden\" data-position=\"fixed\" data-tap-toggle=\"false\" data-transition=\"none\">\
        	<div data-role=\"navbar\">\
            	<ul>\
                	<li><a href=\""+backBrowse+"\" data-transition=\"fade\"><i class=\"icon-reply\"></i></a></li>\
                	<li><a href=\"#\" id='byr1' >1 yr</a></li>\
                    <li><a href=\"#\" id='byr5' >5 yr</a></li>\
                    <li><a href=\"#\" id='byr10' class=\"ui-btn-active ui-state-presist\">10 yr</a></li>\
                    <li><a href=\"#button3\" data-rel=\"popup\" data-position-to=\"window\"><i class=\"icon-info\"></i></a></li>\
            	</ul>\
        	</div>\
    </div>";
	
	$(page).append(htmlElements);
}

/*function generateContainer(page)
{
	var htmlElements = "<div id=\"container\" class=\"myChart\"></div>";
	
	$(page).append(htmlElements);
}*/


function generateCharts(url, title, yAxisTitle, toolTitle, container, type,  showLegend, sourceName, density, backBrowse)//Density used by Nation GDP only
{	
	console.log("Start generate");
	var globalData = "No-Data~101";

	//Get the data for this section
	console.log("Get Data");
	globalData = getData(url, backBrowse);
	console.log("Finished: "+fail);
	
	if(!fail)
	{
		  var stepSize = determineStepSize(density, 10);
		  var chartLength = determineChartLength(density, 10);
		  
		  
		  //Draw an initial chart
		  console.log("Start Chart Draw");
		  drawChart(container, title, yAxisTitle, stepSize, chartLength, toolTitle, globalData, type, showLegend, sourceName);
		  console.log("Finished");
		  
		  //When screen changes size, redraw chart to fit
		  $(window).resize(function() {
						  
		  
					  var phoneWidth = $(window).width();
					  var phoneHeight = $(window).height()-20;		
					  
					  
					  if(chartLoad) {
					  chart.setSize(phoneWidth, phoneHeight, doAnimation = true); }
					  //drawChart(container, title, yAxisTitle, stepSize, chartLength, toolTitle, globalData, type, showLegend, sourceName);
					  
		  }); //  end of resize
		  
		  //One Year
		  $(document).on('click', '#byr1', function() {
			  
			  stepSize = determineStepSize(density, 1);
			  chartLength = determineChartLength(density, 1);
		  
			  
			  drawChart(container, title, yAxisTitle, stepSize, chartLength, toolTitle, globalData, type, showLegend, sourceName);
		  });
		  
		  //Five Year
		  $(document).on('click', '#byr5', function() {
			  
			  stepSize = determineStepSize(density, 5);
			  chartLength = determineChartLength(density, 5);
	  
			  
			  drawChart(container, title, yAxisTitle, stepSize, chartLength, toolTitle, globalData, type, showLegend, sourceName);
		  });
		  
		  //Ten Year
		  $(document).on('click', '#byr10', function() {
		  
			  stepSize = determineStepSize(density, 10);
			  chartLength = determineChartLength(density, 10);
			  
			  
			  drawChart(container, title, yAxisTitle, stepSize, chartLength, toolTitle, globalData, type, showLegend, sourceName);
		  });
	}
}




//Function for retrieving data from database
function getData(url, backBrowse)
{
	
	var dataReturn;
	$.ajax({
     async: false,
     type: 'GET',
     url: url,
	 timeout: 2500,
     success: function(data) {
		  fail = false;
		  dataReturn = data;
     },
	 error: function() {
		 if(window.navigator.onLine)
		 {
			 confirm("Could not connect to Haas Center Severs due to an internal server error. Please try again later.");
		 }
		 else
		 {
			 confirm("Could not connect to Haas Center Severs due to no internet service. Please reconnect your device to the internet.");
		 }
		 fail = true;
		 $.mobile.changePage(backBrowse);
	 }
	 
	});	
	
	return dataReturn;
	
}


//All inclusive function for drawing a chart
function drawChart(container, chartTitle, yAxisTitle, stepSize, chartLength, toolTitle, globalData, type, showLegend, sourceName)
{
	$(document).ready(function() {
		

		var options = getChartOptions(container, chartTitle, yAxisTitle, stepSize, showLegend, sourceName);

		renderChart(options, chartLength, toolTitle, globalData);	// adds US and FL plots to unemployment charts
	
		if(type == 'florida'){
			addNation(chartLength);
		}else if(type == 'msa'){
			addNation(chartLength);
			addFlorida(chartLength);
			
		}
		
	});
	
}


//Function for setting chart options
function getChartOptions(container, chartTitle, yAxisTitle, stepSize, showLegend, sourceName)
{	

	var leftMargin = 55;
	
	if(yAxisTitle === '')
	{
		leftMargin = 40;
	}
		
	
	var options = {
		
		  chart: {
			  renderTo: container,
			  defaultSeriesType: 'line',
			  marginLeft: leftMargin,							//	sets left margin was 50
			  marginRight: 30,	
			  //zoomType: 'x',
			  marginBottom: 50,
			  height: $(window).height()-20,
			  showAxes: true,
			  reflow: false,
			  events: {
			  	load: function(event) {
					chartLoad = true;
				}
			  }// controls chart auto adjustment
		  },
		  plotOptions: {
			  line:{							// change to what ever the type is set to
			      marker: {
					  enabled: false			// gets ride of points on the line
						  }
				   }
		  },
		  title: {
			  text: chartTitle, //null,
			  
		  },
		
		  tooltip: {					// Formats tooltip output
			  
			  useHTML: true,
			  hideDelay: 0,
			  formatter: function() {	
			  
				  if((chartTitle === 'US Retail Gasoline Price') || (chartTitle === 'Gold') || (chartTitle === 'WTI Crude Oil') || (chartTitle === 'FL Retail Gasoline Price')) {	// assigns $ symbol based on the name of y axis
					return ("<span class='highcharts-tooltip'><b>" + this.series.name + "</b></span>" + '<br/>' + this.x + '&nbsp;&nbsp;' + '<b>$' + Highcharts.numberFormat(this.y, 2) + '</b>')
				  }else if((chartTitle === 'Percent') || (chartTitle.indexOf('Unemployment') != -1) || (chartTitle === '30-Yr Fixed Mortgage Rate') || (chartTitle === '10-Yr Treasury Rate')){
					return ("<span class='highcharts-tooltip'><b>" + this.series.name + "</b></span>" + '<br/>' + this.x + '<b>' + '&nbsp;&nbsp;' + Highcharts.numberFormat(this.y, 1) + '%</b>')
				  }else if((chartTitle.indexOf('Index') != -1)) {	
					return ("<span class='highcharts-tooltip'><b>" + this.series.name + "</b></span>" + '<br/>' + this.x + '&nbsp;&nbsp;' + '<b>' + Highcharts.numberFormat(this.y, 2) + '</b>')
				  }else if(chartTitle === 'US Gross Domestic Product') {
					return ("<span class='highcharts-tooltip'><b>" + this.series.name + "</b></span>" + '<br/>' + this.x + '&nbsp;&nbsp;' + '<b>$' + Highcharts.numberFormat((this.y)*0.001, 2) + '</b>' + ' (trillions)')
				  }else if((yAxisTitle.indexOf('USD') != -1) || (chartTitle === 'FL Bed Tax')) {	
					return ("<span class='highcharts-tooltip'><b>" + this.series.name + "</b></span>" + '<br/>' + this.x + '&nbsp;&nbsp;' + '<b>$' + Highcharts.numberFormat(this.y, 0) + '</b>')
				  }else{
					return ("<span class='highcharts-tooltip'><b>" + this.series.name + "</b></span>" + '<br/>' + this.x + '&nbsp;&nbsp;' + ' <b>' + Highcharts.numberFormat(this.y, 0) + '</b>')  
				  } 
			  },
			  crosshairs: [true, true],
		  },
		  xAxis: {
			  type: 'datetime',
			  categories: [ ],
			  //gridLineWidth: 1,
				  labels: {
					  align: 'center',				//	aligns x axis labels to the left
					  rotation: 0,
					  step: stepSize,				// displayes every n'th tick label see global variable
					  y: 20,
					  //x: -10,	
					  
				  },
			  lineWidth: 2,
			  tickWidth: 0,							// removes yAxis ticks
		  },
		  yAxis: {
			  title: {
				  text: yAxisTitle,
				  x: 5,								//	moves text in x direction was 5
			  },
			  //minRange: this.value+1,  //didnt work as expected
			  allowDecimals: false,				 
			  lineWidth: 2,							
													//  adds y axis line
			  labels: {								//	aligns x axis labels to the left
					  rotation: 0,
					  
					  x: -4,						//	shifts tick labels in x direction was -4
					  //step: 1,
					  
					  formatter: function(){		//  formatter function takes care of tick label format for all graphs
						  	 var absValue = Math.abs(this.value);
							 if((chartTitle === 'Palm Cost Employment (SA)') ) {
								 return Highcharts.numberFormat(absValue*0.001,1);
							 }else if((chartTitle === 'FL Employment (SA)')) {
							 	 return Highcharts.numberFormat(absValue*0.000001,1);
							 }else if((chartTitle === 'FL Initial Claims')) {
							 	 return Highcharts.numberFormat(absValue*0.001,0);	 
							 }else if((chartTitle === 'US Employment (SA)')) {
							 	 return Highcharts.numberFormat(absValue*0.000001,1);	 
							 }else if(yAxisTitle.indexOf('Thousands') >= 0) {  // logic 0, -1
								 return Highcharts.numberFormat(absValue*0.001,0,',');
							 }else if(yAxisTitle.indexOf('Millions') >= 0) {
								 return Highcharts.numberFormat(absValue*0.000001,0,',');
							 }else if(yAxisTitle.indexOf('Billions') >= 0) {
								 return Highcharts.numberFormat(absValue*0.000000001,1);
							 }else if(yAxisTitle.indexOf('Trillions') >= 0) {
								 return Highcharts.numberFormat(absValue*0.001,1);	 	 
							 }else if((chartTitle.indexOf('Unemployment') >= 0) || (chartTitle === '30-Yr Fixed Mortgage Rate') || (chartTitle === '10-Yr Treasury Rate')) {
								 return (Highcharts.numberFormat(absValue,1) + "%");
							 }else if((chartTitle === 'US Retail Gasoline Price') || (chartTitle === 'FL Retail Gasoline Price')){	// assigns $ symbol based on the name of y axis
								 return Highcharts.numberFormat(absValue,2);
							 }else if(chartTitle === 'Gold') {
								 return Highcharts.numberFormat(absValue,0,','); // separates thousands with a comma
							 }else {
								 return Highcharts.numberFormat(absValue,0,',');
							 };
					  },
			  },
			  
			  gridLineWidth: 0,
		  },
		  subtitle: {
			text: 'Source: '+ sourceName,
			style: {
				fontSize: 8,
			},
			align: 'right',
			x: 0,
			verticalAlign: 'bottom',
			y: -40,  
		  },
		  exporting: {								// disables of the exporting button
			  buttons: {
				  contextButton: {
					  enabled: false,
				  },
			  },
		  },
		  
		  legend:{
				floating: true, 					// if false it will push down plot
				margin: 20,
				enabled: showLegend,						// disables legend box true or false
				verticalAlign: 'top',
				y: 25,
				itemStyle: {
					fontSize: '14px',
				},
			   //borderColor: '#ffffff',
			   //shadow: false,
			   borderWidth: 0,
		    },
			
		  series: []
	};
	
	
	
	return options;
}


//Function for rendering a chart
function renderChart(options, chartLength, toolTitle, globalData)
{
	
	//console.log("split globalData");
	lines = globalData.split("~");
	
   	$.each(lines, function(lineNo, line) {
	  //console.log("split line:" + lineNo);
	  var items = line.split('=');
	  var chartMax = items.length;  
		
			
	   if (lineNo == 0) {
			$.each(items, function(columnNo, item) {
				if(columnNo > chartLength && columnNo < chartMax-1)
				{
					options.xAxis.categories.push(item);
				}
			});
		}  // end if statement
		else if (lineNo == 1){						// selects column by its number, or select all by using >= 0
			
			var series = {data: [ ]};
			$.each(items, function(rowNo, item) 
			{
						if (rowNo > chartLength && rowNo < chartMax-1) {
						series.data.push(parseFloat(item));
	
						};
			});//end of $.each
			series.name = toolTitle; // adds name of the series
			options.series.push(series);
		}
	});	//end of $.each
	// Create the chart
	//console.log("put data into chart");
	chart = new Highcharts.Chart(options);
	//console.log("done putting data into chart");
	
}


//Removes inserted divs
function removeElements(page)
{
	if(chart != undefined){chart.destroy();}
	chartLoad = false;
}



function determineStepSize(density, years)
{
	if(density == 'quarterly')
	{
		if(years == 10)
		{
			return 10;
		}
		else if(years == 5)
		{
			return 5;
		}
		else
		{
			return 1;
		}
	}
	else
	{
		
		if(years == 10)
		{
			return 40;
		}
		else if(years == 5)
		{
			return 20;
		}
		else
		{
			return 4;
		}
	}
		
}



function determineChartLength(density, years)
{
	

	if(density == 'quarterly')
	{
		if(years == 10)
		{
			return -1;
		}
		else if(years == 5)
		{
			return 19;  //19
		}
		else
		{
			return 35;
		}
	}
	else
	{	
		if(years == 10)
		{
			return -1;
		}
		else if(years == 5)
		{
			return 59;
		}
		else
		{
			return 107;
		}
	}
		
}

function addNation(chartLength)
{
	var data = getData(serverUrl + 'table=nationmonthly&column=unemployment_rate');
	
	chart.addSeries({
						name: "<span class='highcharts-tooltip-color-red'>" + 'US' + "</span>",
						data: parseData(data, chartLength),
						color: '#B9121B',
						dashStyle: 'ShortDot',
						showInLegend: true,
						plotOptions: {
							line: {
								tooltip: {
									valueSuffix: '%',
									valueDecimal: 1,	
								},
							},
						},
						
						
	});
}

function addFlorida(chartLength)
{
	var data = getData(serverUrl + 'table=floridadata&column=unemployment_rate');
	
	chart.addSeries({
						name: "<span class='highcharts-tooltip-color-green'>" + 'FL' + "</span>", 
						data: parseData(data, chartLength),
						color: '#5C832F',
						dashStyle: 'ShortDash',
						showInLegend: true,
						plotOptions: {
							line: {
								tooltip: {
									valueSuffix: '%',
									valueDecimal: 1,	
								},
							},
						},
						
	});
}

function parseData(input, chartLength)
{
	var lines = input.split("~");
	var items = lines[1].split("=");
	var chartMax = items.length;
	
	var series = [];
	$.each(items, function(rowNo, item) 
	{
				if (rowNo > chartLength && rowNo < chartMax-1) {
				series.push(parseFloat(item));

				};
	});//end of $.each
			
	return series;	
	
}





